>>Yes, that code shows that it should be just a few lines of code at the right 
>>place ;-) 

Maybe this require a little more code, because we don't use 
anyevent::http:server,

so we need to add code to handle http requests like

Client request:

GET /chat HTTP/1.1
Host: server.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13
Origin: http://example.com

Server response:

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: HSmrc0sMlYUkAGmm5OPpG2HaGWk=
Sec-WebSocket-Protocol: chat



another example here:

https://github.com/typester/anyevent-websocket-demo/blob/master/chat.pl

----- Mail original ----- 

De: "Dietmar Maurer" <diet...@proxmox.com> 
À: "Alexandre DERUMIER" <aderum...@odiso.com> 
Cc: pve-devel@pve.proxmox.com, "Stefan Priebe - Profihost AG" 
<s.pri...@profihost.ag> 
Envoyé: Dimanche 1 Juin 2014 15:52:33 
Objet: RE: [pve-devel] preview of novnc integration ready 

> >>If you go that way, please use the HTTPServer class, so that we get a fully 
> async implementation. 
> 
> maybe this could help: 
> 
> http://search.cpan.org/~vti/Protocol-WebSocket-0.17/ 
> https://github.com/vti/protocol-websocket/blob/master/examples/anyevent- 
> http-server.pl 
> 

Yes, that code shows that it should be just a few lines of code at the right 
place ;-) 
_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to