SocketServer

Wrapper for a tcp socket server.

Constructors

this
this(string ip, ushort port)

Creates a new tcp socket server.

this
this(ushort port)

Creates a new tcp socket server.

Members

Functions

attach
void attach(SocketEventType eventType, SocketEvent!T event)

Attachs an event.

attach
void attach(SocketEventType eventType, SocketEvent!T[] events)

Attachs a chain of events.

fireEvent
void fireEvent(SocketEventType eventType, SocketEventArgs!T e)

Fires a socket event.

getClient
auto getClient(size_t clientId)

Gets a client by its client id.

getClients
auto getClients()

Gets all clients.

moveNext
void moveNext(SocketEventType eventType)

Moves onto the next event handler in a chain.

removeClient
void removeClient(size_t clientId)

Removes a client from the internal client storage.

report
void report(Exception error, SocketServer!T server = null, SocketClient!T client = null)

Reports an error to the error handler.

start
void start()

Starts the server.

stop
void stop()

Stops the server.

Properties

copyConnectEvents
bool copyConnectEvents [@property getter]

Gets a boolean determining whether the connect events should be copied or not.

copyConnectEvents
bool copyConnectEvents [@property setter]

Sets a boolean determining whether the connect events should be copied or not.

copyDisconnectEvents
bool copyDisconnectEvents [@property getter]

Gets a boolean determining whether the disconnect events should be copied or not.

copyDisconnectEvents
bool copyDisconnectEvents [@property setter]

Sets a boolean determining whether the disconnect events should be copied or not.

copyErrorEvents
bool copyErrorEvents [@property getter]

Gets a boolean determining whether the error events should be copied or not.

copyErrorEvents
bool copyErrorEvents [@property setter]

Sets a boolean determining whether the error events should be copied or not.

copyReceiveEvents
bool copyReceiveEvents [@property getter]

Gets a boolean determining whether the receive events should be copied or not.

copyReceiveEvents
bool copyReceiveEvents [@property setter]

Sets a boolean determining whether the receive events should be copied or not.

storeClients
bool storeClients [@property getter]

Gets a boolean determining whether clients should be stored or not.

storeClients
bool storeClients [@property setter]

Sets a boolean determining whether clients should be stored or not.

Meta