• BBS drop files with socket

    From Xucaen@VERT/TIMEPORT to All on Mon May 22 17:45:38 2017
    I have my socket server working. It allows a person to log on with name and password and then writes the data to a drop file (using door32 format). I know I am missing a step because when I load up my other program that reads in the drop file, it doesn't make a connection to the socket. So I am thinking that I must have to release the socket somehow without closing the socket. Is anyone familiar with this kind of process? I think sbbs must do something like this when it writes to a drop file because my program is able to read those drop files as well and it can connect to the socket. I have googled, but obviously, I must use the right search terms for google to be helpful. So far I haven't found anything , except folks trying to do file transwers over sockets, which is completely different. I am trying to transfer a socket over to another program. Any help is appreciated.

    ... "In the constellation of Cygnus there lurks a mysterious, invisible force."

    ---
    þ Synchronet þ The Time Portal - timeport.synchro.net:2112 - Home of Labyrinth.
  • From Xucaen@VERT/TIMEPORT to All on Tue May 23 20:34:51 2017
    Re: BBS drop files with socket
    By: Xucaen to All on Mon May 22 2017 05:45 pm

    Does Synchronet use WSADuplicateSocket() function to duplicate the socket? It's not easy to understand. I recall years ago working in linux I could load a socket from a text file. But WSADuplicateSocket() doesn't really give any way to get a socket descriptor from it, does it? It's not well documented. I am hopeful someone here will be able to help. I would hate for my project to die like this.

    ---
    þ Synchronet þ The Time Portal - timeport.synchro.net:2112 - Home of Labyrinth.
  • From Digital Man@VERT to Xucaen on Sat Jun 3 14:23:15 2017
    Re: BBS drop files with socket
    By: Xucaen to All on Mon May 22 2017 05:45 pm

    I have my socket server working. It allows a person to log on with name and password and then writes the data to a drop file (using door32 format). I know I am missing a step because when I load up my other program that reads in the drop file, it doesn't make a connection to the socket. So I am thinking that I must have to release the socket somehow without closing the socket. Is anyone familiar with this kind of process?

    You need to duplicate the socket and pass the duplicate to the child process.

    digital man

    Synchronet "Real Fact" #44:
    Synchronet added JavaScript suppport with v3.10a (2001).
    Norco, CA WX: 84.3øF, 44.0% humidity, 13 mph E wind, 0.00 inches rain/24hrs
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Digital Man@VERT to Xucaen on Sat Jun 3 15:21:07 2017
    Re: BBS drop files with socket
    By: Xucaen to All on Tue May 23 2017 08:34 pm

    Re: BBS drop files with socket
    By: Xucaen to All on Mon May 22 2017 05:45 pm

    Does Synchronet use WSADuplicateSocket() function to duplicate the socket? It's not easy to understand. I recall years ago working in linux I could load a socket from a text file. But WSADuplicateSocket() doesn't really give any way to get a socket descriptor from it, does it? It's not well documented. I am hopeful someone here will be able to help. I would hate for my project to die like this.

    On Windows, this is how we duplicate a socket for passing on to child processes:

    // click_socket is the original socket returned from socket()

    if(!DuplicateHandle(GetCurrentProcess(),
    (HANDLE)client_socket,
    GetCurrentProcess(),
    (HANDLE*)&client_socket_dup,
    0,
    TRUE, // Inheritable
    DUPLICATE_SAME_ACCESS)) {
    return(false);
    }


    digital man

    Synchronet/BBS Terminology Definition #6:
    BinkP = BinkD Protocol
    Norco, CA WX: 84.9øF, 46.0% humidity, 13 mph ENE wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net