Ok...I am trying to understand the DCC SEND specs that I have. However, I am not having any luck. Hopefully someone can help. Here is what I have from the spec document:
Create a socket, bind it to INADDR_ANY, port 0, and
make it passive (a listening socket).
Send the recipient a DCC request via CTCP supplying
the address and port of the socket. (This
is ideally taken from the address of the local
side of the socket which is connected to a
server. This is presumably the interface on
the host which is closest to the rest of
the net, and results in one less routing hop
in the case of gateway nodes).
Continue normally until a connection is received.
On a connection:
Accept the connection.
Close the original passive socket.
Conduct transaction on the new socket.
My questions are this. How do I make a passive socket as described using CSocket? Where does the port come from...why are they suggesting port 0. Why set up a socket to listen...close and open another? Can anyone help make sense of this?