R.Wieser
2017-04-04 16:37:40 UTC
Hello all,
After having figured out my previous problem (not getting events) I almost
directly bumped into another one: Imagine a simple HTTP server, which
should be able to handle several requests at a time. Almost directly a few
problems pop-up. Googeling for
1) How do I get a single listening socket to "spawn" multiple data
sockets -- the standard method of closing the listening socket down and than
accepting the new connection on the now-free socket would, AFAICS, cause
other waiting connection-requests to be dropped. Which is double-plus
non-good.
2) How do I get to share the events for the different data-sockets ? --
Although MSDN* tells me that the MSWinsock control should be able to work
as/in a "control array" and the connectionRequest event supposedly has an
"index" argument, looking at the typelib exposed by the MSWinsck.ocx
control** I have here I can't discover the first (no index property) nor the
second (the connectionRequest event shows it has only got a single argument
(supposedly the connectionID) )
* https://msdn.microsoft.com/en-us/library/aa733709(v=vs.60).aspx
** v6.0 SP5.
TL;DR: Does someone have an example handy which shows the basics of a
multi-connection MSWinsock server for a Win98se environment ? I could
surely use one -- if only to figure out how the different parts play
together.
Regards,
Rudy Wieser
After having figured out my previous problem (not getting events) I almost
directly bumped into another one: Imagine a simple HTTP server, which
should be able to handle several requests at a time. Almost directly a few
problems pop-up. Googeling for
1) How do I get a single listening socket to "spawn" multiple data
sockets -- the standard method of closing the listening socket down and than
accepting the new connection on the now-free socket would, AFAICS, cause
other waiting connection-requests to be dropped. Which is double-plus
non-good.
2) How do I get to share the events for the different data-sockets ? --
Although MSDN* tells me that the MSWinsock control should be able to work
as/in a "control array" and the connectionRequest event supposedly has an
"index" argument, looking at the typelib exposed by the MSWinsck.ocx
control** I have here I can't discover the first (no index property) nor the
second (the connectionRequest event shows it has only got a single argument
(supposedly the connectionID) )
* https://msdn.microsoft.com/en-us/library/aa733709(v=vs.60).aspx
** v6.0 SP5.
TL;DR: Does someone have an example handy which shows the basics of a
multi-connection MSWinsock server for a Win98se environment ? I could
surely use one -- if only to figure out how the different parts play
together.
Regards,
Rudy Wieser