On Monday, February 27, 2023 at 11:50:42 AM UTC+1, Zenchess wrote:
> I actually made a websocket package a while back when trying to make a multiplayer game. I didn't perfectly implement the protocol, although most of the work is done and it worked for my scenario. I tried loading it in dolphin 8 and it said it required a prequisite package "Sockets Connection", but I think it will load in Dolphin 7. You could try it and if you have any issues I could fix it up. I'm hosting it here:
>
>
http://zenchess.com/dolphin/WebSocket.pac
I actually need a client, not a server. :}
And implementing it with WinHTTP did work out in the end. About a day of implementation and a couple days of debugging.
Two things I got stuck on:
- Specifying *dword for an argument that was specified in Win32 docs as DWORD_PTR. Switching to dword fixed it, though I'm still not sure that's technically correct.
- Figuring out to set up the receive function so it doesn't block literally everything while waiting for a new message. Learned about overlapping calls and that worked perfectly.
I will probably publish it to my Github (JBetz) after I've cleaned it up, though I can email it to you or anyone else if interested. Currently it's littered with debug logs.