/// <summary> /// Creates an IonTcpConnection instance for a given socket and assigns it an unique ID. /// </summary> /// <param name="Socket">The System.Networking.Socket.Sockets object to base the Connection on.</param> /// <returns>IonTcpConnection</returns> public IonTcpConnection CreateConnection(Socket Socket) { if (Socket == null) return null; IonTcpConnection Connection = new IonTcpConnection(++mConnectionCounter, Socket); CoreManager.GetCore().GetStandardOut().PrintNotice(string.Format("Created Connection for {0}.", Connection.GetIPAddressString())); return Connection; }
/// <summary> /// Creates an IonTcpConnection instance for a given socket and assigns it an unique ID. /// </summary> /// <param name = "socket">The System.Networking.Socket.Sockets object to base the Connection on.</param> /// <returns>IonTcpConnection</returns> public IonTcpConnection CreateConnection(Socket socket) { if (socket == null) return null; IonTcpConnection connection = new IonTcpConnection(++Count, socket); CoreManager.ServerCore.GetStandardOut().PrintNotice(string.Format("Created Connection for {0}.", connection.GetIPAddressString())); return connection; }
/// <summary> /// Creates an IonTcpConnection instance for a given socket and assigns it an unique ID. /// </summary> /// <param name = "socket">The System.Networking.Socket.Sockets object to base the Connection on.</param> /// <returns>IonTcpConnection</returns> public IonTcpConnection CreateConnection(Socket socket) { if (socket == null) { return(null); } IonTcpConnection connection = new IonTcpConnection(++Count, socket); CoreManager.ServerCore.GetStandardOut().PrintNotice(string.Format("Created Connection for {0}.", connection.GetIPAddressString())); return(connection); }
public void DropConnection(uint clientID) { IonTcpConnection connection = GetConnection(clientID); if (connection == null) { return; } CoreManager.ServerCore.GetStandardOut().PrintNotice("Dropped Connection => " + connection.GetIPAddressString()); connection.Stop(); lock (_connections) _connections.Remove(clientID); }