Пример #1
0
 /// <summary>
 /// A callback that's used when we disconnect from the socket using the Networking class.
 /// </summary>
 /// <param name="ss"></param>
 /// <param name="handleDisconnect"></param>
 private void socketDisconected(SocketState ss, handleSocketClosed handleDisconnect)
 {
     if (ss.TheSocket != null)
     {
         ss.TheSocket.Close();
     }
     handleDisconnect();
 }
Пример #2
0
 /// <summary>
 /// Close the connection for this server, using the specified handler passed.
 /// </summary>
 /// <param name="handleDisconnect"></param>
 internal void closeConnection(handleSocketClosed handleDisconnect)
 {
     Networking.Disconnect(clientSocketState, false, (ss) => { socketDisconected(ss, handleDisconnect); });
 }