Example #1
0
 public void SendToAll(DeveOutgoingMessageStreamSocket devOut)
 {
     lock (clientConnections)
     {
         foreach (DeveConnectionStreamSocket deveClientConnection in clientConnections)
         {
             deveClientConnection.Send(devOut);
         }
     }
 }
        internal void CheckAndSendKeepAliveIfNeeded()
        {
            if (lastKeepAlive + keepAliveTimer < DateTime.Now)
            {
                //Console.WriteLine("Sending keepalive to server");
                lastKeepAlive = DateTime.Now;

                DeveOutgoingMessageStreamSocket keepalivemsg = new DeveOutgoingMessageStreamSocket(DeveMessageTypeStreamSocket.KeepAlive);
                Send(keepalivemsg);
            }
        }
 public void Send(DeveOutgoingMessageStreamSocket devOut)
 {
     messagesToSendQueue.Enqueue(devOut);
 }
Example #4
0
 public void Send(DeveOutgoingMessageStreamSocket devOut)
 {
     connection.Send(devOut);
 }