示例#1
0
        public static void AddServer(int serverId, string ip, int port)
        {
            RemoteService remoteService = RemoteService.CreateTcpProxy(serverId.ToString(), ip, port, 30 * 1000);

            remoteService.PushedHandle += OnPushCallback;
            m_TcpRemotes.Add(serverId, remoteService);
        }
示例#2
0
        static void Test()
        {
            var socketRemote = RemoteService.CreateTcpProxy("proxy1", "127.0.0.1", 9001, 10);

            socketRemote.Call("SignOut", new RequestParam(), result => {
            });
        }
示例#3
0
 public void SetTcpProxy(string poxyId, string ip, int port, int heartInterval)
 {
     if (ServerSvice == null)
     {
         ServerSvice = RemoteService.CreateTcpProxy("proxy_gate_login", "127.0.0.1", 9002, 10 * 1000);
     }
 }
示例#4
0
        static LobbyServerSender()
        {
            string lobbyServerIP   = ConfigUtils.GetSetting("Server.LobbyIP");
            int    lobbyServerPort = int.Parse(ConfigUtils.GetSetting("Server.LobbyPort"));

            m_TcpRemote = RemoteService.CreateTcpProxy(ConfigUtils.GetSetting("Server.Id"), lobbyServerIP, lobbyServerPort, 30 * 1000);
            m_TcpRemote.PushedHandle += OnPushCallback;
        }
示例#5
0
        static WorldServerSender()
        {
            string worldServerIP   = ConfigUtils.GetSetting("Server.WorldIP");
            int    worldServerPort = int.Parse(ConfigUtils.GetSetting("Server.WorldPort"));

            m_TcpRemote = RemoteService.CreateTcpProxy(ConfigUtils.GetSetting("Server.Id"), worldServerIP, worldServerPort, 30 * 1000);
            m_TcpRemote.PushedHandle += OnPushCallback;
        }
示例#6
0
        public static void InitialServerService(string serverProxy, string ip, int port, int heartBeatInterval)
        {
            if (mServerServices.ContainsKey(serverProxy))
            {
                return;
            }
            ServerService service = new ServerService();

            service.IP   = ip;
            service.Port = port;
            service.HeartBeatInterval = heartBeatInterval;
            service.Service           = RemoteService.CreateTcpProxy(serverProxy, ip, port, heartBeatInterval);
            mServerServices.Add(serverProxy, service);
        }
示例#7
0
 static ServerToServer()
 {
     tcpRemote = RemoteService.CreateTcpProxy("0", "192.168.0.100", 9001, 30 * 1000);
 }