Ejemplo n.º 1
0
 /// <summary>
 /// Called when a connection has been established with the server
 /// </summary>
 /// <param name="remoteEndPoint">The IPEndPoint of the server</param>
 protected override void OnConnected(IPEndPoint remoteEndPoint)
 {
     //don't call the base because we don't want to raise the Connected event yet
     //base.OnConnected(remoteEndPoint);
     IsConnectedResetEvent.Reset();
     SendPublicKey(); //immediately send the public key
     //can't log messages yet - Log.v("Client Sent Public Key");
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Called when a connection has been terminated
 /// </summary>
 /// <param name="remoteEndPoint">The IPEndPoint of the server</param>
 /// <param name="e">An exception if one ocurred</param>
 protected virtual void OnDisconnected(IPEndPoint remoteEndPoint, Exception e)
 {
     IsConnectedResetEvent.Reset();
     Disconnected?.Invoke(this, remoteEndPoint, e);
 }