Esempio n. 1
0
        public override void Register(PhotonServerPeer peer)
        {
            var registerSubServerOperation =
                new RegisterSubServerData()
            {
                GameServerAddress = PublicIpAddress.ToString(),
                TcpPort           = TcpPort,
                UdpPort           = UdpPort,
                ServerId          = ServerId,
                ServerType        = ServerType,
                ApplicationName   = ApplicationName
            };

            peer.SendOperationRequest(new OperationRequest((byte)ServerOperationCode.RegisterSubServer,
                                                           new RegisterSubServer()
            {
                RegisterSubServerOperation = SerializeUtil.Serialize(registerSubServerOperation)
            }), new SendParameters());
        }
Esempio n. 2
0
        public void Register(PhotonServerPeer peer)
        {
            var registerSubServerOperation = new RegisterSubServerData()
            {
                GameServerAddress = ServerConfiguration.PublicIpAddress,
                TcpPort           = ServerConfiguration.TcpPort,
                UdpPort           = ServerConfiguration.UdpPort,
                ServerId          = ServerConfiguration.ServerId,
                ServerType        = ServerConfiguration.ServerType,
                ServerName        = ServerConfiguration.ServerName
            };

            XmlSerializer mySerializer = new XmlSerializer(typeof(RegisterSubServerData));
            StringWriter  outString    = new StringWriter();

            mySerializer.Serialize(outString, registerSubServerOperation);

            peer.SendOperationRequest(new OperationRequest(0, new RegisterSubServer()
            {
                RegisterSubServerOperation = outString.ToString()
            }), new SendParameters());
        }
Esempio n. 3
0
        public override void Register(PhotonServerPeer peer)
        {
            var registerSubServerOperation = new RegisterSubServerData()
            {
                GameServerAddress = PublicIpAddress.ToString(),
                TcpPort           = TcpPort,
                UdpPort           = UdpPort,
                ServerId          = ServerId,
                ServerType        = ServerType,
                ApplicationName   = ApplicationName
            };
            XmlSerializer mySerializer = new XmlSerializer(typeof(RegisterSubServerData));
            StringWriter  outString    = new StringWriter();

            mySerializer.Serialize(outString, registerSubServerOperation);

            peer.SendOperationRequest(
                new OperationRequest((byte)ServerOperationCode.RegisterSubServer,
                                     new RegisterSubServer()
            {
                RegisterSubServerOperation = outString.ToString()
            }), new SendParameters());
        }
Esempio n. 4
0
        public override void Register(PhotonServerPeer peer)
        {
            Log.DebugFormat("RRRegistering login server.");
            var registerSubServerOperation = new RegisterSubServerData()
            {
                GameServerAddress = PublicIpAddress.ToString(),
                TcpPort =  TcpPort,
                UdpPort =  UdpPort,
                ServerId = ServerId,
                ServerType = ServerType,
                ApplicationName = ApplicationName

            };
            XmlSerializer mySerializer = new XmlSerializer(typeof(RegisterSubServerData));
            StringWriter outString = new StringWriter();
            mySerializer.Serialize(outString, registerSubServerOperation);

            peer.SendOperationRequest(
                new OperationRequest((byte) ServerOperationCode.RegisterSubServer,
                    new RegisterSubServer() { RegisterSubServerOperation = outString.ToString()}), new SendParameters());
        }