Esempio n. 1
0
 private void ConnectionReceived(StreamSocketListener sender, StreamSocketListenerConnectionReceivedEventArgs args)
 {
     HasConnection = true;
     var socket = new ComplexStreamSocket(args.Socket);
     StartStreaming(socket);
     HasConnection = false;
 }
Esempio n. 2
0
 private bool Stream(ComplexStreamSocket socket)
 {
     bool continueStreaming = true;
     try
     {
         var message = socket.DataReader.GetMessage();
         var result = _actions.Response(message);
         Debug.WriteLine("Sending " + message);
         continueStreaming = socket.DataWriter.WriteMessage(result);
     }
     catch (Exception exception)
     {
         continueStreaming = false;
         Debug.WriteLine(SocketError.GetStatus(exception.HResult));
     }
     return continueStreaming;
 }
Esempio n. 3
0
 void StartStreaming(ComplexStreamSocket socket)
 {
     while (Stream(socket));
 }
Esempio n. 4
0
 public StreamRequester()
 {
     _socket = new ComplexStreamSocket(new StreamSocket());
 }