internal static void InitClient(this Client client, string address, int port)
        {
            if (client.socket == null)
            {
                client.id      = -1;
                client.address = address;
                client.port    = port;

                using (client.mreBeginConnect = new ManualResetEvent(false))
                {
                    client.mreBeginConnect.Reset();
                    client.BeginConnect();
                    client.mreBeginConnect.WaitOne();
                }

                if (!client.closed)
                {
                    client.InitFinal();

                    client.RaiseConnected();
                }
                else
                {
                    client.RaiseDisconnected();
                }
            }
        }
        internal static void InitServer(this Client client, Socket listener)
        {
            if (client.socket == null)
            {
                client.address = null;
                client.port    = 0;
                client.socket  = listener;
                client.closed  = false;

                client.InitFinal();

                client.RaiseConnected();
            }
        }