• Java BBS Door Program

    From David Smith@1:123/180 to All on Thu Jul 9 16:55:54 2020
    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). 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.

    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?

    --- Mystic BBS v1.12 A45 2020/02/18 (Windows/32)
    * Origin: Daves BBS (1:123/180)
  • From Rob Swindell to David Smith on Wed Jul 15 17:55:58 2020
    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
  • From David Smith@1:123/180 to Rob Swindell on Thu Jul 16 13:54:42 2020
    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).

    You may be right the ServerSocket API may not be what I need. I had tried
    to open an OutputStream usign a number of different methods but it just
    locked the BBS user up completely.

    Should the handle be the only thing I would need or do I need to specify a
    baud rate somewhere?

    --- Mystic BBS v1.12 A45 2020/02/18 (Windows/32)
    * Origin: Daves BBS (1:123/180)
  • From Rob Swindell to David Smith on Thu Jul 16 21:36:05 2020
    Re: Re: Java BBS Door Program
    By: David Smith to Rob Swindell on Thu Jul 16 2020 01:54 pm

    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).

    You may be right the ServerSocket API may not be what I need. I had tried
    to open an OutputStream usign a number of different methods but it just locked the BBS user up completely.

    Should the handle be the only thing I would need or do I need to specify a baud rate somewhere?

    Just the socket handle/descriptor. Baud rates don't apply.

    digital man

    Synchronet "Real Fact" #69:
    You can purchase the BBS Documentary DVD set at http://bbsdocumentary.com/order/
    Norco, CA WX: 67.7°F, 75.0% humidity, 6 mph E wind, 0.00 inches rain/24hrs