This interface is implemented by a TCP listener object. Use the INetworkManager.createTcpListener method to create one.
interface ITcpListener {
// Methods
${bind}(port: number): Promise<void>;
${bind#bind1}(host: string, port: number): Promise<void>;
${listen}(): Promise<${ITcpSocket}>;
}
// This interface is not available in managed environment
// This interface is not available in native environment
bind(port: number): Promise<void>;
// This method is not available in managed environment
// This method is not available in native environment
port
Bind a TCP listener to a given local TCP port on all local interfaces.
bind(host: string, port: number): Promise<void>;
// This method is not available in managed environment
// This method is not available in native environment
host
port
Bind a TCP listener to a given local endpoint.
listen(): Promise<${ITcpSocket}>;
// This method is not available in managed environment
// This method is not available in native environment
When connection occurs, a connected TCP socket is returned.
Listen for incoming connection. bind
must be called before calling this method.