SendConnect() public method

发送连接请求
public SendConnect ( ) : void
return void
Esempio n. 1
0
        static void Main(string[] args)
        {
            SocketClient socket = new SocketClient();

            socket.SendConnect();
            //ByteBuffer buff = new ByteBuffer();
            //buff.WriteString("hello world");
            //socket.SendMessage(buff);
            //SeverNet sever = new SeverNet();
            //sever.Start("127.0.0.1", 9999);
            //bool isSend = false;
            //while (true)
            //{
            //    //Console.WriteLine(Sys.GetNowTime());
            //    if (isSend)
            //    {
            //        isSend = false;
            //    }
            //    else
            //    {
            //        Console.WriteLine("");
            //        Console.Write("发送消息:");
            //        string str = Console.ReadLine();
            //        MessageData messageData = new MessageData();
            //        messageData.data.mainCmdId = 0;
            //        messageData.data.subCmdId = 1;
            //        ProtocolBytes protocolBytes = new ProtocolBytes();
            //        protocolBytes.AddString(str);
            //        messageData.data.data = protocolBytes;
            //        sever.Send(messageData);
            //        str = "";
            //        isSend = true;
            //    }

            //}
            while (true)
            {
                ;
            }
        }
Esempio n. 2
0
 void Start()
 {
     client = new SocketClient();
     client.OnRegister();
     client.SendConnect();
 }
Esempio n. 3
0
 /// <summary>
 /// 发送链接请求
 /// </summary>
 public void SendConnect()
 {
     SocketClient.SendConnect();
 }
Esempio n. 4
0
 /// <summary>
 /// 发送链接请求
 /// </summary>
 public void SendConnect()
 {
     m_clients.SendConnect(AppConst.SocketAddress, AppConst.SocketPort);
 }
Esempio n. 5
0
 /// <summary>
 /// 发送链接请求
 /// </summary>
 public void RequestConnect()
 {
     _socketClient.SendConnect(_host, _port);
 }
Esempio n. 6
0
 /// <summary>
 /// 发送链接请求
 /// </summary>
 public void SendConnect(string host, int port)
 {
     _socket.SendConnect(host, port);
 }
Esempio n. 7
0
 public void SendConnect(string addr, int port)
 {
     SocketClient.SendConnect(addr, port);
 }
 /// <summary>
 /// 发送链接请求
 /// </summary>
 public override void SendConnect(string address, int port)
 {
     m_SocketClient.Close();
     m_SocketClient.SendConnect(address, port);
 }