Class for creating a WebSocket server for communication with React Native clients. All client logs - logs from React Native application - are processed here.
↳ WebSocketDevClientServer
• new WebSocketDevClientServer(fastify)
Create new instance of WebSocketDevClientServer and attach it to the given Fastify instance.
Any logging information, will be passed through standard fastify.log API.
| Name | Type | Description | 
|---|---|---|
| fastify | FastifyDevServer | Fastify instance to attach the WebSocket server to. | 
packages/repack/src/server/ws/WebSocketDevClientServer.ts:21
• Protected fastify: FastifyDevServer
Fastify instance from which server will receive upgrade connections.
packages/repack/src/server/ws/WebSocketServer.ts:16
• Readonly paths: string[]
packages/repack/src/server/ws/WebSocketServer.ts:18
• Readonly server: Server
An instance of the underlying WebSocket server.
packages/repack/src/server/ws/WebSocketServer.ts:13
▸ onConnection(socket): void
Process new WebSocket connection from client application.
| Name | Type | Description | 
|---|---|---|
| socket | WebSocket | Incoming client's WebSocket connection. | 
void
packages/repack/src/server/ws/WebSocketDevClientServer.ts:52
▸ processMessage(message): void
Process client message.
| Name | Type | Description | 
|---|---|---|
| message | string | Stringified client message. | 
void
packages/repack/src/server/ws/WebSocketDevClientServer.ts:30
▸ shouldUpgrade(pathname): boolean
| Name | Type | 
|---|---|
| pathname | string | 
boolean
packages/repack/src/server/ws/WebSocketServer.ts:45
▸ upgrade(request, socket, head): void
| Name | Type | 
|---|---|
| request | IncomingMessage | 
| socket | Socket | 
| head | Buffer | 
void