Nala Ginrut <[email protected]> writes: > Hi David! > > IMHO, there's no HTTP header anymore once you've done handshake > successfully, but sending frame defined by WebSocket.
Yes, that is true. > For this case, once handshake is successful, I think you have to spawn a > new server instance (or use callbacks, depends on your server > architecture design) rather than using Guile inner HTTP server to manage > this socket. Or it'll be cracked while parsing HTTP header as you > pasted. > > One of the possible way is to build a WebSocket gateway to dispatch the > connections to each server instance (or callbacks) and managing > handshake for each connection. > > Anyway, to support WebSocket, one have to customize the server core. The > Guile inner server is dedicated to be the HTTP one, IIRC. That's why I > stopped development of websocket module in Artanis, since I have to > write its new async server core first. ;-) IMO, an asynchronous/multi-threaded server is a separate issue. I was aiming for a solution that allowed a single websocket to be used on Guile's single-thread default web server. Of course, the websocket implementation should be able to be applied to a more advanced server, should one be written. I think you're right that something in the default HTTP server must be changed, but I haven't grokked the implementation enough to figure it out. AFAICT, the HTTP server socket needs to be handed over to a WebSocket server procedure, suspending additional HTTP request processing until the WebSocket is closed and the socket is handed back to the HTTP server. Does that make some sense? Things are too foggy for me to tell. -- David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate
