[Spice-devel] [PATCH spice-server] reds: Check link header magic without waiting all header

Uri Lublin uril at redhat.com
Thu Jan 26 16:41:35 UTC 2017


On 01/26/2017 06:20 PM, Uri Lublin wrote:
> Hi Frediano,
>
> I'd replace "all" in subject with "for the whole"
>
> On 01/26/2017 05:54 PM, Frediano Ziglio wrote:
>> This allows the connection to early fail in case initial bytes
>> are not correct.
>> This allows for instance VNC client to graceful fail connecting
>> to a spice-server. This happens easily as the two protocols
>> share the same range of ports.
>>
>> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
>> Tested-by: Daniel P. Berrange <berrange at redhat.com>
>

I wrote the following python script to test it, till vnc
client is ready:
(And added some debug messages in spice-server)

---
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('localhost', 5924))
s.send("RFB ")
magic = s.recv(4)
print 'magic is ', magic
---

Uri.


More information about the Spice-devel mailing list