Code:
Initiator:
DCC command issued.
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.
Initiator:
DCC command issued.
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.
Po ovome, trebao bih da otvorim socket na INADDR_ANY, port 0 i cekam da se neko konektuje medjutim Socket.Connect() ne prolazi (WSAGetLastError vraca 10061 Connection refused). Probao sam i umesto INADDR_ANY da stavim 127.0.0.1, i da promenim port, ali opet nece. Jer neko mozda pisao implementaciju DCC protokola pa da mi kaze kako da inicijalizujem DCC SEND ? Hvala.