VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Winsock API Webserver

Almar Joling  (9 Submissions)   Internet/HTML   Visual Basic 3.0   Advanced   Wed 3rd February 2021

Very unique code. This is the only Webserver on the internet that uses the Winsock api (and where the source code is downloadable!) I needed a simple webserver without the Winsock OCX for my game's server, for some easy remote-admin. That's why this code also has the Basic Authenticationscheme implented. The code is a bit messy, but it's been tough to get it working anyways. I hope you people enjoy this code and that you may learn something from it (That's why I put it online :)
-Supports images
-Checks if pages exists (does not return 404 though)
-Has Basic Authentication functionality (run it and you'll see it)
-Pretty secure I believe ("/../" won't work)
-Accepts multiple connections!
One drawback: The events are based on two command buttons. Yes, I'm sorry. but I just don't like AddressOfs, hooks, callbacks and whatever... they just are too crashy when you're beginning with something like this...
I used someones 2 class modules found on this site... I forgot the author of it. if anyone knows it, let me kow. Credit where credit is due :)
Anyway, enjoy!

Assumes
Basic knowledge of the HTTP1.0/1.1 protocol, and how to connect to a local webserver (enter 127.0.0.1)

Returns
A freshly server HTML page

Side Effects
Using Winsock API is sometimes a very delicate job... be carefull what you change

API Declarations
38kb of Winsock declarations =-)

Rate Winsock API Webserver (11(11 Vote))

Download Winsock API Webserver

Winsock API Webserver Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters