AsyncTCPListener

Accepts connections on a single IP:PORT tuple by sending a new inbound AsyncTCPConnection object to the handler for every newly completed handshake.

Note: If multiple threads are listening to the same IP:PORT tuple, the connections will be distributed evenly between them. However, this behavior on Windows is not implemented yet.

Constructors

this
this(EventLoop evl, fd_t sock)

Members

Functions

host
typeof(this) host(string hostname, size_t port)

Sets the local listening interface to the specified hostname/port.

ip
typeof(this) ip(string ip, size_t port)

Sets the local listening interface to the specified ip/port.

kill
bool kill()

Stops accepting connections and cleans up the underlying OS resources.

run
bool run(void delegate(TCPEvent) delegate(AsyncTCPConnection) del)

Starts accepting connections by registering the given handler with the underlying OS event.

Mixins

__anonymous
mixin DefStatus
Undocumented in source.
__anonymous
mixin EvInfoMixins
Undocumented in source.
__anonymous
mixin TCPListenerDistMixins
Undocumented in source.

Properties

local
NetworkAddress local [@property getter]

Returns the local internet address as an OS-specific structure.

local
NetworkAddress local [@property setter]

Sets the local internet address as an OS-specific structure.

noDelay
bool noDelay [@property setter]

Sets the default value for nagle's algorithm on new connections.

noDelay
bool noDelay [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
socket
fd_t socket [@property getter]

Use to implement distributed servicing of connections

Mixed In Members

From mixin DefStatus

hasError
bool hasError [@property getter]

Check this property to make sure the event loop hasn't failed

status
StatusInfo status [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
error
string error [@property getter]

Returns a human-readable error message from the underlying operating system.

From mixin EvInfoMixins

CleanupData
struct CleanupData
Undocumented in source.
evInfo
EventInfo* evInfo [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
evInfo
EventInfo* evInfo [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta