1) Does Mystic pass a blocking or non-blocking socket handle?
2) With regard to point 1, is there an established standard which all BBS systems adhere to (i.e. blocking or non-blocking)?
3) If the door changes socket mode, should this be undone prior to exit?
4) Is the door expected to perform winsock clean-up if the client
performs an impromptu disconnect?
Blocking
The only standard that I know of that ever attempted to define anything was Mystic's DOOR32 and that uses blocking sockets. I assume you'd probably get blocking from most BBSes then by default, but I can't say
for sure what other software does.
I think it'd be a good practice to do this.
The original intention was that the socket should be duplicated before being passed to the door, but I think in practice that didn't end up
being guarenteed or even done at all because of variations in operating systems (and if I am not mistaken some OSes specifically said that
sockets should not be duplicated).
It *might* be safe to call only when it drops but I can't say for sure without experimentation.
If I remember correctly calling WSACleanup is a Windows specific thing
and it invalidates any socket handles used by the process. For that
reason I think it was not called in any case within D32 doors. Instead
it let the BBS detect the connection loss and do what it does.
Things may behave differently depending of if/when the socket was duplicated by the BBS before being passed, but I would
operate on the assumption that the socket is not duplicated.
Sysop: | Coz |
---|---|
Location: | Anoka, MN |
Users: | 2 |
Nodes: | 4 (0 / 4) |
Uptime: | 155:51:16 |
Calls: | 166 |
Files: | 5,389 |
Messages: | 223,385 |