Esempio n. 1
0
        public void TestInputServerHandshake()
        {
            InputServerHandshake packet = NanoPacketFactory
                                          .ParsePacket(ResourcesProvider.GetBytes("tcp_input_server_handshake.bin", ResourceType.Nano), _context)
                                          as InputServerHandshake;

            Assert.NotNull(packet);
            Assert.NotNull(packet.Header);

            Assert.Equal <NanoChannel>(NanoChannel.Input, packet.Channel);
            Assert.Equal <NanoPayloadType>(NanoPayloadType.Streamer, packet.Header.PayloadType);

            Assert.Equal <InputPayloadType>(InputPayloadType.ServerHandshake,
                                            (InputPayloadType)packet.StreamerHeader.PacketType);
            Assert.Equal <StreamerFlags>(StreamerFlags.GotSeqAndPrev | StreamerFlags.Unknown1,
                                         packet.StreamerHeader.Flags);
            Assert.Equal <uint>(1, packet.StreamerHeader.SequenceNumber);
            Assert.Equal <uint>(0, packet.StreamerHeader.PreviousSequenceNumber);

            Assert.Equal <uint>(3, packet.ProtocolVersion);
            Assert.Equal <uint>(1280, packet.DesktopWidth);
            Assert.Equal <uint>(720, packet.DesktopHeight);
            Assert.Equal <uint>(0, packet.MaxTouches);
            Assert.Equal <uint>(672208545, packet.InitialFrameId);
        }
        private async Task SendServerHandshakeAsync()
        {
            InputServerHandshake packet = new InputServerHandshake(
                (uint)ProtocolVersion,
                DesktopWidth,
                DesktopHeight,
                maxTouches: 0,
                initialFrameId: FrameId);

            await SendAsync(packet);
        }
Esempio n. 3
0
 public abstract void OnServerHandshake(InputServerHandshake handshake);
 public override void OnServerHandshake(InputServerHandshake handshake)
 {
 }
 public override void OnServerHandshake(InputServerHandshake handshake)
 {
     throw new NotImplementedException("");
 }