Constructor

new (?domains:Array<String>)

Methods

Inherited Variables

Defined by ThreadServer

connectLag:Float

Polling timeout.

errorOutput:Output

Stream to send error messages.

initialBufferSize:Int

Space allocated to buffers when they are created.

listen:Int

Number of total connections the server will accept.

maxBufferSize:Int

Maximum size of buffered data read from a socket. An exception is thrown if the buffer exceeds this value.

maxSockPerThread:Int

The most sockets a thread will handle.

messageHeaderSize:Int

Minimum message size.

nthreads:Int

Number of server threads.

updateTime:Float

Time between calls to update.

Inherited Methods

Defined by ThreadServer

addSocket (s:Socket):Void

Called when the server gets a new connection.

dynamicafterEvent ():Void

Called after a client connects, disconnects, a message is received, or an update is performed.

dynamicclientDisconnected (c:Client):Void

Called when a client disconnects or an error forces the connection to close.

dynamiconError (e:Dynamic, stack:Array<StackItem>):Void

Called when an error has occurred.

sendData (s:Socket, data:String):Void

Sends data to a client.

stopClient (s:Socket):Void

Shutdown a client's connection and remove them from the server.

dynamicupdate ():Void

This method is called periodically. It can be used to do server maintenance.

work (f:Void ‑> Void):Void

Internally used to delegate something to the worker thread.