public override void OnHandlerMessage(OperationRequest request, OperationResponse response, ClientPeer peer) { List <ServerProperty> list = manager.GetServerList(); string json = JsonMapper.ToJson(list); Dictionary <byte, object> parameters = response.Parameters; parameters.Add((byte)ParameterCode.ServerList, json); response.ReturnCode = (short)ReturnCode.Success; }
public override void OnHandlerMessage(Photon.SocketServer.OperationRequest request, OperationResponse response, ClientPeer peer, SendParameters sendParameters) { List <ServerProperty> list = manager.GetServerList(); string json = JsonMapper.ToJson(list); Dictionary <byte, object> parameters = response.Parameters; parameters.Add((byte)ParameterCode.ServerList, json); response.OperationCode = request.OperationCode; }
public override void OnHandleMessage(OperationRequest request, OperationResponse response, MasterClientPeer peer, SendParameters sendParameters) { var list = serverManager.GetServerList(); ParameterTool.AddParameter(response.Parameters, ParameterCode.ServerList, list); //string serverlist = "我是服务器列表"; //response.Parameters.Add((byte)ParameterCode.ServerList, serverlist); response.ReturnCode = (short)ReturnCode.Success; // EventData eventData = new EventData((byte) OperationCode.Server); // SendEvent(peer,eventData); }