/// <summary> /// /// </summary> public void Client_SendData(object Data, TCP_ClientNode node = null) { if (node == null) { foreach (TCP_ClientNode cn in ClientNodes) { cn.Send(Data);// Send the data to everybody } } else { node.Send(Data);// Send the data to a single client } }
/// <summary> /// Handels Network Commands /// </summary> /// <param name="_Data">The Data that needs to be handeled</param> /// <param name="node">The client that sent it</param> internal void Server_Commands(object _Data, TCP_ClientNode node) { Data.InternalNetworkCommand Data = (Data.InternalNetworkCommand)_Data; if (Data.CommandType == Networking.Data.Commands.SSL_Enable) { node.EnableSSL(Data.Response); } else if (Data.CommandType == Networking.Data.Commands.SSL_Dissable) { node.DissableSSL(); } else if (Data.CommandType == Networking.Data.Commands.SSL_Active) { } else if (Data.CommandType == Networking.Data.Commands.SetBufferSize) { //Command Not Implemented node.Send(new Data.InternalNetworkCommand(Networking.Data.Commands.SetBufferSize, Networking.Data.ResponseCode.Not_Implemented)); } }