public AsyncSocketController(int tmp_Port)
 {
     try {
         _serverSocket = new AsyncServer(tmp_Port);
     } catch (Exception ex) {
         throw ex;
     }
 }
 public AsyncSocketController(int tmp_Port)
 {
     try {
         _serverSocket = new AsyncServer(tmp_Port);
     } catch (Exception ex) {
         throw ex;
     }
 }
Beispiel #3
0
 public AsyncSocketController(int tmp_Port)
 {
     try {
         _serverSocket = new AsyncServer(tmp_Port);
     } catch (Exception ex) {
         if (SocketError != null)
         {
             SocketError(ex);
         }
     }
 }
Beispiel #4
0
 /// <summary>
 /// Entry Point
 /// </summary>
 public UsersObject()
 {
     try {
         _users = new List<UserObject>(); // Initialise new list of users for in memory operations
         _server = new AsyncServer(5999); // Listen on the port I will alwyas listen on
         _server.ConnectionAccept += _server_ConnectionAccept; // Wire up event
         _server.Start(); // Begin listening for new connections immediately
     } catch (Exception ex) {
         if (ProcessError != null) {
             ProcessError(ex, "UsersObject");
         }
     }
 }
Beispiel #5
0
 /// <summary>
 /// Close
 /// </summary>
 public void Close()
 {
     try {
         foreach (var user in _users) {
             user.CloseSocket();
         }
         _users = new List<UserObject>();
         _server.Close();
         _server = null;
     } catch (Exception ex) {
         throw ex;
     }
 }
Beispiel #6
0
 public Users()
 {
     _users = new List<User>();
     _server.ConnectionAccept += _server_ConnectionAccept;
     _server = new AsyncServer(5999);
     _server.Start();
 }