示例#1
0
        public static void ConnectToServer(Gbl gbl, out TcpSocketEx tcp)
        {
            var client = new TcpSocketEx(gbl.RemoteIpAddress, gbl.Port);

            try
            {
                client.Connect(IPAddress.Parse(gbl.RemoteIpAddress), gbl.Port);
                tcp = client;
            }
            catch (Exception e)
            {
                tcp = null;
            }
        }
示例#2
0
 public static void ReleaseConnection(TcpSocketEx client)
 {
     client.Disconnect(false);
 }