interface ITcpListener {
// Methods
${listen}(): Promise<${ITcpSession}>;
${close}(): void;
}
// This interface is not available in managed environment
// This interface is not available in native environment
listen(): Promise<${ITcpSession}>;
// This method is not available in managed environment
// This method is not available in native environment
Returns a promise. When the promise becomes ready, it produces a reference to TCP Session object you may use to communicate with connected party.
Start listening on a configured endpoint. This method completes immediately, returning a promise object. When this promise becomes ready, it yields a reference to new TCP session object, which represents the connected party.
Listen for a new TCP connection
async function listen() {
var l = await networkManager.createTcpListener("localhost", 80);
var socket = await l.listen();
}
close(): void;
// This method is not available in managed environment
// This method is not available in native environment
Closes the listener object. This object may not be used after the close operation.