• synchronet sockets

    From Underminer@VERT/UNDRMINE to Digital Man on Friday, August 07, 2020 23:14:48
    Hey, Rob.

    I haven't done much with termios in the past, so there's the possibility I'm missing something relatively simple or newby here and just hoping for a bit of guidance.

    What does the socket number synchronet reports correspond to on Linux? I had figured it was the filedes, but that does not appear to be the case. Just trying to figure out what to get termios to read and write to :)
    ---
    Underminer
    The Undermine BBS - bbs.undermine.ca:423
    Fidonet: 1:342/17
    ---
    Synchronet The Undermine - bbs.undermine.ca:423
  • From Digital Man@VERT to Underminer on Saturday, August 08, 2020 06:04:23
    Re: synchronet sockets
    By: Underminer to Digital Man on Fri Aug 07 2020 04:14 pm

    Hey, Rob.

    I haven't done much with termios in the past, so there's the possibility I'm missing something relatively simple or newby here and just hoping for a bit of guidance.

    What does the socket number synchronet reports correspond to on Linux?

    Not sure which "report" you're referring to, but socket represented as integer descriptors on Linux.

    I had
    figured it was the filedes, but that does not appear to be the case. Just trying to figure out what to get termios to read and write to :)

    Can you give more context to your question?

    digital man

    Sling Blade quote #1:
    Karl: I've killed Doyle with a lawn mower blade. Yes, I'm right sure of it. Norco, CA WX: 67.0F, 72.0% humidity, 0 mph SE wind, 0.00 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Underminer@VERT/UNDRMINE to Digital Man on Thursday, August 13, 2020 01:22:07
    Re: synchronet sockets
    By: Digital Man to Underminer on Fri Aug 07 2020 11:04 pm

    Not sure which "report" you're referring to, but socket represented as integer descriptors on Linux.

    When running a door with %h you get a socket descriptor, and likewise if you look at the door32.sys dropfile.

    Can you give more context to your question?

    Sure. I've been playing around with writing a modern version of an old door game to run natively on Linux. While certainly not a big deal as both Synchronet and Mystic intercept stdio for linux doors, and I'm sure other software does too, I was just wanting to try my hand at socketio output as well. I had thought/hoped maybe the integer passed from the above command line/dropfile would corrospond to the filedes used by termios, but I seem to be barking up the wrong tree with that one.
    ---
    Underminer
    The Undermine BBS - bbs.undermine.ca:423
    Fidonet: 1:342/17
    ---
    Synchronet The Undermine - bbs.undermine.ca:423
  • From Digital Man@VERT to Underminer on Thursday, August 13, 2020 04:27:59
    Re: synchronet sockets
    By: Underminer to Digital Man on Wed Aug 12 2020 06:22 pm

    Re: synchronet sockets
    By: Digital Man to Underminer on Fri Aug 07 2020 11:04 pm

    Not sure which "report" you're referring to, but socket represented as integer descriptors on Linux.

    When running a door with %h you get a socket descriptor, and likewise if you look at the door32.sys dropfile.

    Can you give more context to your question?

    Sure. I've been playing around with writing a modern version of an old door game to run natively on Linux. While certainly not a big deal as both Synchronet and Mystic intercept stdio for linux doors, and I'm sure other software does too, I was just wanting to try my hand at socketio output as well. I had thought/hoped maybe the integer passed from the above command line/dropfile would corrospond to the filedes used by termios, but I seem to be barking up the wrong tree with that one.

    It is a file/socket descriptor. You should (on *nix-based OSes anyway) be able to just write() to it and the output gets sent to the user. Or read() from it to get input from the user. I'm not sure what termios has to do it.

    digital man

    Sling Blade quote #13:
    Karl: He lives inside of his own heart. That's an awful big place to live in. Norco, CA WX: 76.3F, 50.0% humidity, 4 mph E wind, 0.00 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Underminer@VERT/UNDRMINE to Digital Man on Thursday, August 13, 2020 10:52:12
    Re: synchronet sockets
    By: Digital Man to Underminer on Wed Aug 12 2020 09:27 pm

    It is a file/socket descriptor. You should (on *nix-based OSes anyway) be able to just write() to it and the output gets sent to the user. Or read() from it to get input from the user. I'm not sure what termios has to do it.

    Ok, sounds likely that that should do what I want then. I haven't had much need or opportunity to deal with sockets in c++ unless I've been interfacing with an existing API, so I thought I had to actually load the socket. I knew it was possible/likely I was barking up the wrong tree and easiest just to ask.

    Thanks!
    ---
    Underminer
    The Undermine BBS - bbs.undermine.ca:423
    Fidonet: 1:342/17
    ---
    Synchronet The Undermine - bbs.undermine.ca:423
  • From Digital Man@VERT to Underminer on Friday, August 14, 2020 01:56:11
    Re: synchronet sockets
    By: Underminer to Digital Man on Thu Aug 13 2020 03:52 am

    Re: synchronet sockets
    By: Digital Man to Underminer on Wed Aug 12 2020 09:27 pm

    It is a file/socket descriptor. You should (on *nix-based OSes anyway) be able to just write() to it and the output gets sent to the user. Or read() from it to get input from the user. I'm not sure what termios has to do it.

    Ok, sounds likely that that should do what I want then. I haven't had much need or opportunity to deal with sockets in c++ unless I've been interfacing with an existing API, so I thought I had to actually load the socket. I knew it was possible/likely I was barking up the wrong tree and easiest just to ask.

    Yeah, you don't use socket() to create a new one, just read (or recv) and write (or send) with the descriptor provided. Other socket functions should work too (e.g. select, poll, etc.).

    digital man

    Synchronet/BBS Terminology Definition #51:
    NNTP = Network News Transfer Protocol
    Norco, CA WX: 90.9F, 19.0% humidity, 3 mph ESE wind, 0.00 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Underminer@VERT/UNDRMINE to Digital Man on Friday, August 14, 2020 06:41:53
    Re: synchronet sockets
    By: Digital Man to Underminer on Thu Aug 13 2020 06:56 pm

    Yeah, you don't use socket() to create a new one, just read (or recv) and write (or send) with the descriptor provided. Other socket functions should work too (e.g. select, poll, etc.).
    digital man

    Yeah, seems to be working as intended and desired. I was just making it more complicated than it needed to be :D
    ---
    Underminer
    The Undermine BBS - bbs.undermine.ca:423
    Fidonet: 1:342/17
    ---
    Synchronet The Undermine - bbs.undermine.ca:423