示例#1
0
        public void Execute(NetworkBase network)
        {
            switch (internCode)
            {
            case InternalCode.DiscoverHostRequest: network._UnconnectedRPCDiscoverHostRequest(stream.ReadHostDataFilter(), stream.ReadDouble(), endpoint); break;

            case InternalCode.DiscoverHostResponse: network._UnconnectedRPCDiscoverHostResponse(stream.ReadLocalHostData(), stream.ReadDouble(), endpoint); break;

            case InternalCode.KnownHostRequest: network._UnconnectedRPCKnownHostRequest(stream.ReadDouble(), stream.ReadBoolean(), endpoint); break;

            case InternalCode.KnownHostResponse: network._UnconnectedRPCKnownHostResponse(stream.ReadLocalHostData(), stream.ReadDouble(), endpoint); break;

            case InternalCode.PreConnectRequest: network._UnconnectedRPCPreConnectRequest(endpoint); break;

            case InternalCode.PreConnectResponse: network._UnconnectedRPCPreConnectResponse(endpoint); break;

            case InternalCode.LicenseRequest: network._UnconnectedRPCLicenseRequest(stream.ReadLocalHostData(), stream.ReadBoolean(), stream.ReadBytes(), endpoint); break;

            default:
                Log.Debug(NetworkLogFlags.RPC, "Unknown internal Unconnected RPC: ", internCode, " from ", endpoint);
                break;
            }
        }