2 using System.Collections.Generic;
3 using System.Net.Sockets;
10 private List<string> buffer =
new List<string>();
26 client.
QueueMessage(UnicodeEncoding.Unicode.GetBytes(message));
34 bool IHandler.HandleReceivedMessage(
Client client,
Message message)
36 client.
LogDebug(
"Broadcast: " + UnicodeEncoding.Unicode.GetString(message.MessageBytes));
37 client.
Log(
">" + UnicodeEncoding.Unicode.GetString(message.MessageBytes));
41 bool IHandler.HandleSendMessage(Client client, ref
Message message)
46 bool IHandler.InitializeConnection(Client client)
51 bool IHandler.PreHandleReceivedMessage(Client client, ref Message message)
56 void IHandler.Tick(Client client)
void Log(string log)
Logs the message onto the associated loggers.
void Broadcast(Client client, string message)
Broadcast a message to all other clients connected to the server.
BroadcastHandler()
Creates a new instance of BroadcastHandler.
void Disconnected(Client client)
Called when the client is disconnected.
void QueueMessage(byte[] message)
Add a message to the message queue.
Handler interface for client communication.
void LogDebug(string debugMessage)
Logs the debug message onto the associated loggers.
Base class for TCP Client.