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); }
static void Test() { var socketRemote = RemoteService.CreateTcpProxy("proxy1", "127.0.0.1", 9001, 10); socketRemote.Call("SignOut", new RequestParam(), result => { }); }
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); } }
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; }
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; }
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); }
static ServerToServer() { tcpRemote = RemoteService.CreateTcpProxy("0", "192.168.0.100", 9001, 30 * 1000); }