public void ConnectToGatewayAsync(string ip_addr, int port) { Debug.Assert(m_UserSession is TcpSession); TcpSession tcp_session = m_UserSession as TcpSession; tcp_session.ConnectAsync(this, ip_addr, port); }
public void ConnectToAccountServerAsync(string ip_addr, int port) { Debug.Assert(m_ServerSession is TcpSession); TcpSession tcp_sess = m_ServerSession as TcpSession; tcp_sess.SetConnectedEvent(OnAsynConnected); tcp_sess.ConnectAsync(this, ip_addr, port); }