public bool Init(ISockCallee sockcall) { m_lgsockcall = sockcall; m_sockcall = new SockCall(); m_sockcall.SetGameSock(this); m_gameSender = new GameSender(); m_gameReceiver = new GameReceiver(); InitUserSock(); m_gameSender.SetReceiver(m_gameReceiver); return(true); }
public bool Init(ISockCallee sockcall) { m_lgsockcall = sockcall; m_sockcall = new SockCall(); m_sockcall.SetGameSock(this); if (SysUtil.IsIos) { m_sock = new Socket(AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp); } else { m_sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); } m_scoket = new UserSock(m_sockcall, m_sock); m_gameSender = new GameSender(); m_gameSender.SetSocket(ref m_scoket); m_gameReceiver = new GameReceiver(); m_gameSender.SetReceiver(m_gameReceiver); return(true); }