UNPKG

shardy

Version:

Framework for online games and applications on Node.js

18 lines (17 loc) 497 B
import { SocketType } from './Server'; import { TransportType } from './Transport'; import { Logger } from './Logger'; export declare class Connection { private socket; private type; onConnect: () => void; onData: (data: Buffer) => void; onError: (error: Error) => void; onClose: () => void; log: Logger; constructor(socket: SocketType, type: TransportType); setLogger(log: Logger): void; close(): void; destroy(): void; send(data: Buffer): void; }