Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21131

VB6 Wrapper Class for WinHTTP WebSockets?

$
0
0
See WebSocket for an overview.


I've been using some clunky 3rd party libraries for ws/wss WebSocket protocol clients. These are pretty painful and full of bugs. But I saw that a while back in Windows 8 or 8.1 Microsoft finally added support into WinHTTP. With Windows 7 and everything older sliding into oblivion it may finally be time to revisit this.

Sadly Microsoft stubbornly chose not to bother adding this to the WinHttpRequest object (or even providing it as a new WinHTTP DLL for Win7 and earlier), so we need to climb below this and deal with the raw API calls. That's a nuisance for many reasons, but no more so than trying to implement async operation, without which WebSockets aren't very useful anyway.

There's a C++ sample available: WinHTTP WebSocket sample

I was wondering if anyone had tried to either work from this to create a C++ ActiveX DLL (using ATL?) we could use, or perhaps had cobbled together a VB6 class based on the C++ sample? I'd like to avoid reinventing the wheel if somebody has one or the other working, preferably with at least basic documentation of its methods, properties, and events.

I don't need the server side, which is normally implemented as a web server extension anyway.

Viewing all articles
Browse latest Browse all 21131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>