示例#1
0
        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;
        }
示例#2
0
        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;
        }
示例#3
0
        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);
        }