Example #1
0
 /// <summary>
 /// Connects to server.
 /// </summary>
 public void Connect()
 {
     _communicationChannel = CreateCommunicationChannel();
     _communicationChannel.Disconnected    += CommunicationChannel_Disconnected;
     _communicationChannel.MessageReceived += CommunicationChannel_MessageReceived;
     _communicationChannel.MessageSent     += CommunicationChannel_MessageSent;
     _communicationChannel.Start();
     //_pingTimer.Start();
     OnConnected();
 }
Example #2
0
 /// <summary>
 /// Connects to server.
 /// </summary>
 public void Connect()
 {
     WireProtocol.Reset();
     _communicationChannel = CreateCommunicationChannel();
     _communicationChannel.WireProtocol     = WireProtocol;
     _communicationChannel.Disconnected    += CommunicationChannel_Disconnected;
     _communicationChannel.MessageReceived += CommunicationChannel_MessageReceived;
     _communicationChannel.MessageSent     += CommunicationChannel_MessageSent;
     _communicationChannel.Start();
     _pingTimer.Start();
     OnConnected();
 }
Example #3
0
 /// <summary>
 /// Connects to server.
 /// </summary>
 public void Connect(params Tuple <SocketOptionLevel, SocketOptionName, object>[] socketOptions)
 {
     WireProtocol.Reset();
     _communicationChannel = CreateCommunicationChannel(socketOptions);
     _communicationChannel.WireProtocol     = WireProtocol;
     _communicationChannel.Disconnected    += CommunicationChannel_Disconnected;
     _communicationChannel.MessageReceived += CommunicationChannel_MessageReceived;
     _communicationChannel.MessageSent     += CommunicationChannel_MessageSent;
     _communicationChannel.Start();
     _pingTimer.Start();
     OnConnected();
 }
Example #4
0
 /// <summary>
 /// Connects to server.
 /// </summary>
 public void Connect()
 {
     WireProtocol.Reset();
     _communicationChannel = CreateCommunicationChannel();
     _communicationChannel.WireProtocol     = WireProtocol;
     _communicationChannel.Disconnected    += CommunicationChannel_Disconnected;
     _communicationChannel.MessageReceived += CommunicationChannel_MessageReceived;
     _communicationChannel.MessageSent     += CommunicationChannel_MessageSent;
     _communicationChannel.Start();
     _pingTimer = Observable
                  .Interval(TimeSpan.FromSeconds(30))
                  .Subscribe(
         x =>
     {
         PingTimer_Elapsed();
     });
     OnConnected();
 }
Example #5
0
 /// <summary>
 ///     Connects to server.
 /// </summary>
 public void Connect()
 {
     WireProtocol.Reset();
     _communicationChannel = CreateCommunicationChannel();
     _communicationChannel.WireProtocol = WireProtocol;
     _communicationChannel.Disconnected += CommunicationChannel_Disconnected;
     _communicationChannel.MessageReceived += CommunicationChannel_MessageReceived;
     _communicationChannel.MessageSent += CommunicationChannel_MessageSent;
     _communicationChannel.Start();
     _pingTimer.Start();
     OnConnected();
 }