Subj : Java BBS Door Program
To   : David Smith
From : Rob Swindell
Date : Wed Jul 15 2020 05:55 pm

 Re: Java BBS Door Program
 By: David Smith to All on Thu Jul 09 2020 04:55 pm

> Hey guys,
>
> I was tinkering around a little with Door programming in Java and am having
> a little trouble grasping the whole Door concept. I know the Door32.sys file
> contains a Comm Type (0=local, 1=serial, 2=telnet) and a socket handle. If
> I'm a telnet user connected to a BBS I should have a Comm Type of 2 and a
> socket handle greater than zero (I think).

That sounds right. If on a *nix OS, then socket handles are the same as file descriptors, in which case the socket handle would be greater than two (stderr).

> So in Java, somehow I think I
> need to connect to that socket handle in an input and output stream to be
> able to read and write data to that socket.

Yup. If it's a *nix OS, you could write to the socket handle just as you would any other file descriptor. On Windows, socket handles are distinctly different from file descriptors and thus require WinSock function calls to write to them.

> So, I spent some time playing around with the java.net ServerSocket API but
> haven't realy figured out how to get the connection. Are there any gurus out
> there who can give me some examples on how to receive a handle from the BBS
> and communicate with the Telnet user?

I am a BBS/door guru, but have very little experience with Java. In general, I think Java has not had a lot of traction as a platform for writing BBS doors. If you can find a way to construct a socket object and specify the underlying descriptor/handle that should be used (rather than opening a new socket), then that should get you started. I'm not sure "ServerSocket" is the right thing as that *sounds* like a listening socket which is not really what you want. The socket is already connected (no bind/listen/accept required).

Good luck,

                                           digital man

Sling Blade quote #15:
Doyle Hargraves: What'cha doin' with that lawn mower blade Karl?
Norco, CA WX: 78.8�F, 56.0% humidity, 12 mph E wind, 0.00 inches rain/24hrs