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) { ; } }
void Start() { client = new SocketClient(); client.OnRegister(); client.SendConnect(); }
/// <summary> /// 发送链接请求 /// </summary> public void SendConnect() { SocketClient.SendConnect(); }
/// <summary> /// 发送链接请求 /// </summary> public void SendConnect() { m_clients.SendConnect(AppConst.SocketAddress, AppConst.SocketPort); }
/// <summary> /// 发送链接请求 /// </summary> public void RequestConnect() { _socketClient.SendConnect(_host, _port); }
/// <summary> /// 发送链接请求 /// </summary> public void SendConnect(string host, int port) { _socket.SendConnect(host, port); }
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); }