The OpenD Programming Language

FiberManager.listenTcp4

Convenience functions for creating listening sockets. These are trivial forwarders to listenStream, constructing the appropriate std.socket.Address object for you. Note the address lookup does NOT at this time use the fiber io and may thus block your thread.

You can close the returned socket when you want to stop listening, or just ignore it if you want to listen for the whole duration of the program.

  1. Socket listenTcp4(ushort port, void delegate(Socket) connectionHandler, int backlog)
  2. Socket listenTcp4(string address, ushort port, void delegate(Socket) connectionHandler, int backlog)
    class FiberManager
    final
    listenTcp4
    (
    string address
    ,
    ushort port
    ,
    void delegate connectionHandler
    ,
    int backlog = 8
    )

Meta