Bon, j'ai regardé un peu cmt ça se passe, j'ai fait quelque essai, en fait oui ya bien un gros point que on a oublié :
A DCC connection begins with one
client; we will call it Client A. Client A, which (in most cases) is
connected to an IRC server, sets up a listening socket. It then sends a
CTCP request to Client B, the recipient of the DCC connection. The CTCP
request contains the type of connection, any relevant info (such as a
filename and size), and Client A's IP address and the port it is
listening on.If Client B received the CTCP
message, it then decides what to do about it; usually it can be
configured to accept it, ignore it, or ask the user. If the user
decides to accept the DCC request, Client B then attempts to establish
a TCP connection to the IP and port given by Client A in the original
CTCP message. If Client B establishes a connection, then the DCC
transaction may continue. Note that there is no message sent
if Client B denies the request, therefore Client A must wait a certain
amount of time and then give up. This is called a timeout. The amount
of time varies, but need not be very long. Only in very extreme cases
of lag can a short timeout cause a DCC to fail. (For example, if it
takes longer than the timeout for the original CTCP to reach Client B,
though this sometimes happens with XDCC servers that send data too
fast.)
Donc toi si tu veux tout géré par socket : -si c'est toi qui demande a faire un dcc chat, tu doit d'abord écouter le port que tu sépcifie, ensuite tu envoie le truc, l'autre s'il répond *oui* va simplement se connecter sur ton ip sur le port que tu as spécifié, donc toi a ce moment là tu recoi l'info, tu acceptes la connexion et c'est bon. -si c'est l'autre qui demande, tu recoi l'ip et le port, donc suffit d'ouvrir une connexion socket dessus.
Dans tout les cas, je pense que c'est très facilement faisable, hésite pas a demandé de l'aide a nouveau si ta un soucis.
Note : l'erreur que tu as : -Acknowledging chat request... -Unable to connect -DCC session closed
Viens simplement du fait que tu initie bien l'invitation au dcc chat, mais ensuite si tu te connecte pas ou n'écoute pas de connexion, il y a un soucis ;)
|