Function prepareEchoConnectionKit
- prepareEchoConnectionKit(zone): ((...args: []) => GuardedKit<{
handler: {
onClose(_connection: Connection, reason?: any, _connectionHandler?: ConnectionHandler): Promise<void>;
onReceive(_connection: Connection, bytes: string, _connectionHandler: ConnectionHandler): Promise<string>;
};
listener: {
onAccept(_port: any, _localAddr: any, _remoteAddr: any, _listenHandler: any): Promise<Guarded<{
onClose(_connection: Connection, reason?: any, _connectionHandler?: ConnectionHandler): Promise<void>;
onReceive(_connection: Connection, bytes: string, _connectionHandler: ConnectionHandler): Promise<string>;
}>>;
onListen(port: any, _listenHandler: any): Promise<void>;
};
}>) Returns ((...args: []) => GuardedKit<{
handler: {
onClose(_connection: Connection, reason?: any, _connectionHandler?: ConnectionHandler): Promise<void>;
onReceive(_connection: Connection, bytes: string, _connectionHandler: ConnectionHandler): Promise<string>;
};
listener: {
onAccept(_port: any, _localAddr: any, _remoteAddr: any, _listenHandler: any): Promise<Guarded<{
onClose(_connection: Connection, reason?: any, _connectionHandler?: ConnectionHandler): Promise<void>;
onReceive(_connection: Connection, bytes: string, _connectionHandler: ConnectionHandler): Promise<string>;
}>>;
onListen(port: any, _listenHandler: any): Promise<void>;
};
}>)
- (...args): GuardedKit<{
handler: {
onClose(_connection: Connection, reason?: any, _connectionHandler?: ConnectionHandler): Promise<void>;
onReceive(_connection: Connection, bytes: string, _connectionHandler: ConnectionHandler): Promise<string>;
};
listener: {
onAccept(_port: any, _localAddr: any, _remoteAddr: any, _listenHandler: any): Promise<Guarded<{
onClose(_connection: Connection, reason?: any, _connectionHandler?: ConnectionHandler): Promise<void>;
onReceive(_connection: Connection, bytes: string, _connectionHandler: ConnectionHandler): Promise<string>;
}>>;
onListen(port: any, _listenHandler: any): Promise<void>;
};
}> Returns GuardedKit<{
handler: {
onClose(_connection: Connection, reason?: any, _connectionHandler?: ConnectionHandler): Promise<void>;
onReceive(_connection: Connection, bytes: string, _connectionHandler: ConnectionHandler): Promise<string>;
};
listener: {
onAccept(_port: any, _localAddr: any, _remoteAddr: any, _listenHandler: any): Promise<Guarded<{
onClose(_connection: Connection, reason?: any, _connectionHandler?: ConnectionHandler): Promise<void>;
onReceive(_connection: Connection, bytes: string, _connectionHandler: ConnectionHandler): Promise<string>;
}>>;
onListen(port: any, _listenHandler: any): Promise<void>;
};
}>
Create a ConnectionHandler that just echoes its packets.