MTSC  1.0.5
Build TCP servers out of modules with handlers for communication, exception and logging.
MTSC.Server.Handlers.IHandler Interface Reference

Interface for communication handlers. More...

Inheritance diagram for MTSC.Server.Handlers.IHandler:
MTSC.Server.Handlers.BroadcastHandler MTSC.Server.Handlers.EncryptionHandler MTSC.Server.Handlers.HttpHandler MTSC.Server.Handlers.WebsocketHandler

Public Member Functions

bool HandleClient (Server server, ClientData client)
 Handles a new client. More...
 
bool HandleSendMessage (Server server, ClientData client, ref Message message)
 Handles a message before sending. More...
 
bool PreHandleReceivedMessage (Server server, ClientData client, ref Message message)
 Called before the message handling. Perform here any processing of the message. More...
 
bool HandleReceivedMessage (Server server, ClientData client, Message message)
 Handles the received message. More...
 
void ClientRemoved (Server server, ClientData client)
 Handles the removal of a client from the server. More...
 
void Tick (Server server)
 Method performs regular operations onto the server. More...
 

Detailed Description

Interface for communication handlers.

Definition at line 11 of file IHandler.cs.

Member Function Documentation

◆ ClientRemoved()

void MTSC.Server.Handlers.IHandler.ClientRemoved ( Server  server,
ClientData  client 
)

Handles the removal of a client from the server.

Parameters
clientClient about to be removed.
serverServer calling the handler.

◆ HandleClient()

bool MTSC.Server.Handlers.IHandler.HandleClient ( Server  server,
ClientData  client 
)

Handles a new client.

Parameters
clientClient to be handled.
serverServer calling the handler.
Returns
True if the handler processed the client.

◆ HandleReceivedMessage()

bool MTSC.Server.Handlers.IHandler.HandleReceivedMessage ( Server  server,
ClientData  client,
Message  message 
)

Handles the received message.

Parameters
messageMessage to be handled.
serverServer calling the handler.
Returns
True if the message has been handled, false if the message has not been handled.

◆ HandleSendMessage()

bool MTSC.Server.Handlers.IHandler.HandleSendMessage ( Server  server,
ClientData  client,
ref Message  message 
)

Handles a message before sending.

Parameters
clientClient object.
messageMessage to be processed.
serverServer calling the handler.
Returns
True if no other handler should handle this message.

◆ PreHandleReceivedMessage()

bool MTSC.Server.Handlers.IHandler.PreHandleReceivedMessage ( Server  server,
ClientData  client,
ref Message  message 
)

Called before the message handling. Perform here any processing of the message.

Parameters
clientClient structure.
messageMessage to be preprocessed.
serverServer calling the handler.
Returns
True if the message has been preprocessed and no other handler should handle it anymore.

◆ Tick()

void MTSC.Server.Handlers.IHandler.Tick ( Server  server)

Method performs regular operations onto the server.

Parameters
serverServer calling the handler.

The documentation for this interface was generated from the following file: