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); }
// Use this for initialization void Start() { Debug.Log("client start"); m_socket.connect("127.0.0.1", 8300, RecvCallback); }
/** 连接 */ public void connect(string host, int port) { _socket.connect(host, port); }