Esempio n. 1
0
        public virtual Boolean CloseAll(Int32 status)
        {
            lock (webSocketNetwork.WsSendLock)
            {
                webSocketNetwork.PrepareSendFrame(WebSocketNetwork.WsFin | WebSocketNetwork.WsClose, false, null, 0, 0, status);
                if (!Multicast(webSocketNetwork.WsSendBuffer.ToArray()))
                {
                    return(false);
                }

                return(base.DisconnectAll());
            }
        }
Esempio n. 2
0
 public Int64 SendText(Byte[] buffer, Int64 offset, Int64 size)
 {
     lock (webSocketNetwork.WsSendLock)
     {
         webSocketNetwork.PrepareSendFrame(WebSocketNetwork.WsFin | WebSocketNetwork.WsText, true, buffer, offset, size);
         return(base.Send(webSocketNetwork.WsSendBuffer.ToArray()));
     }
 }