コード例 #1
0
 private void HeartbeatTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
 {
     try
     {
         _ws?.Send("");
     }
     catch (Exception ex)
     {
         _logger.LogException(ex);
     }
 }
コード例 #2
0
        private void Ws_Opened(object sender, EventArgs e)
        {
            var s = "{\"type\":\"startWatching\",\"data\":{\"stream\":{\"quality\":\"abr\",\"protocol\":\"hls\",\"latency\":\"low\",\"chasePlay\":false},\"room\":{\"protocol\":\"webSocket\",\"commentable\":true},\"reconnect\":false}}";

            try
            {
                _ws.Send(s);
            }
            catch (Exception ex)
            {
            }
        }
コード例 #3
0
ファイル: MixerChat.cs プロジェクト: mixer/chat-unity
 // We only support anonymous mode now.
 private void SendAuthMessage()
 {
     _websocket.Send(
         "{" +
         "\"type\": \"method\"," +
         "\"method\": \"auth\"," +
         "\"arguments\": [" +
         _channelID + "," +
         "   0," +
         "\"" + _authKey + "\"" +
         "]," +
         "\"id\": 0" +
         "}"
         );
 }
コード例 #4
0
 public void SendPing()
 {
     _ws?.Send("");
 }
コード例 #5
0
 public override void Send(string data) => Websocket.Send(data);
コード例 #6
0
 public void Send(string message)
 {
     _ws?.Send(message);
 }