Ejemplo n.º 1
0
            public int OnSockConnected(UserSock sock, string addr, int port)
            {
                LogSystem.Log("OnSockConnected");
                m_gamesock.SetConnected(true);
                if (null != m_gamesock.m_lgsockcall)
                {
                    m_gamesock.m_lgsockcall.on_connected(addr, port);
                    return(1);
                }
                else
                {
                    if (m_gamesock != null)
                    {
                        VarList args = VarList.GetVarList();
                        args.AddString(addr);
                        args.AddInt(port);
                        m_gamesock.Excute_CallBack("on_connected", args);
                        args.Collect();
                        return(1);
                    }
                    else
                    {
                        LogSystem.LogError("Error, OnSockConnected gamesock is null");
                    }

                    return(0);
                }
            }
Ejemplo n.º 2
0
 public int OnSockConnected(UserSock sock, string addr, int port)
 {
     Log.Trace("OnSockConnected");
     if (null != m_gamesock.m_lgsockcall)
     {
         m_gamesock.m_lgsockcall.on_connected(addr, port);
         return(1);
     }
     else
     {
         VarList args = new VarList();
         if (m_gamesock != null)
         {
             args.AddString(addr);
             args.AddInt(port);
             m_gamesock.Excute_CallBack("on_connected", args);
             return(1);
         }
         else
         {
             //Log.TraceError("Error, OnSockConnected gamesock is null");
         }
         return(0);
     }
 }