3rd Eye Scene C#
3rd Eye Scene C# documentation
Tes::Server Namespace Reference

Classes

class  ConnectionMonitor
 A TCP/IP based implementation of IConnectionMonitor. More...
interface  IConnectionMonitor
interface  IServer
 Defines the interface for a 3rd Eye Scene server. More...
struct  ServerSettings
 Defines the initialisation settings for IServer. More...
class  TcpConnection
 A client connection over TCP/IP. More...
class  TcpServer
 Implements a 3rd Eye Scene server over TCP/IP. More...

Enumerations

enum  ConnectionMonitorMode { None, Synchronous, Asynchronous }
 Defines the operation mode for a connection monitor. More...
enum  ServerFlag { Collate = (1 << 1), Compress = (1 << 2) }
 Defines server option flags. More...

Functions

server.ConnectionMonitor. Start (ConnectionMonitorMode.Synchronous)
 Defines a utility interface for monitoring new connections for a IServer.
 for (;;)
server.ConnectionMonitor. Stop ()
server.ConnectionMonitor. Join ()
delegate void NewConnectionCallback (IServer server, IConnection connection)
 Delegate used as a callback when a new connection is added to the server .

Variables

</code ></example >< example >
Asynchronous Usage< code lang="C#">
float 
dt = 0
IServer server

Enumeration Type Documentation

Defines the operation mode for a connection monitor.

Enumerator:
None 

Inactive.

Synchronous 

IConnectionMonitor to be updated from the main thread.

Asynchronous 

IConnectionMonitor to be updated in a background thread managed by itself.

Defines server option flags.

Enumerator:
Collate 

summary> Set to collate outgoing messages into larger packets.

summary> Set to compress collated outgoing packets using GZip compression. Has no effect if

Collate

is not set.


Function Documentation

delegate void Tes::Server::NewConnectionCallback ( IServer  server,
IConnection  connection 
)

Delegate used as a callback when a new connection is added to the server .

Provided as an argument to IServer.UpdateConnections(IList{IConnection}, NewConnectionCallback).

Parameters:
serverThe server to which the connection belongs.
connectionThe new connection.
server ConnectionMonitor Tes::Server::Start ( ConnectionMonitorMode.  Synchronous)

Defines a utility interface for monitoring new connections for a IServer.

The monitor manages listening for new connections and expiring old ones. Doing so can be time consuming, so the monitor supports running its own monitor thread. It also supports synchronous operation in case connection monitoring is unnecessary, or unable to be pushed off thread.

Asynchronous mode is activated by calling Start(ConnectionMonitorMode) and stopped with Stop()Calls to Join() will block until the monitor thread has completed, but should only be called after stop() has been called. The CommitConnections(NewConnectionCallback) method must still be called by the main thread (synchronously) to control when connections are activated and deactivated.

Synchronous mode is supported by calling MonitorConnections() to accept new connections. This must be followed by a call to CommitConnections(NewConnectionCallback) to commit the changes to the owning IServer.

Synchronous usage.

      float dt = 0;
      IServer server = /* Server.Create()  
 All Classes Namespaces Functions Variables Enumerations Properties Events