Exemple #1
0
 public Boolean init()
 {
     IFacade    = new IFacade();
     baseSocket = new BaseSocket();
     baseSocket.Socket(ProfileView.profile.serverIP, Int32.Parse(ProfileView.profile.serverPort));
     baseSocket.onRecive    += onRecive;
     baseSocket.onConnect   += onConnect;
     baseSocket.onDisconect += onDisconect;
     baseSocket.onSent      += onSent;
     baseSocket.connect();
     return(true);
 }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("client start");

        m_socket.connect("127.0.0.1", 8300, RecvCallback);
    }
Exemple #3
0
 /** 连接 */
 public void connect(string host, int port)
 {
     _socket.connect(host, port);
 }