View Single Post
  #8 (permalink)  
Old June 23rd, 2002
James Connolly James Connolly is offline
Devotee
 
Join Date: January 18th, 2002
Posts: 22
James Connolly is flying high
Default

Well the procedure is -

GNUTELLA CONNECT/0.4\n\n

you should get back

GNUTELLA OK

At this point you are connected. Usually I send a ping right after I receive the "GNUTELLA OK" message. After that you will be reading (and usually writing) data from the socket/connection. Initially, I just read all data in and printed it (however you want - hex, decimal, ascii). Later on, I wrote functions that would read and parse this data. After you send the ping you may receive pongs, queries, and sometimes misdirected or bad packers (misdirected queryhits and pushes, which you shouldn't get since you hadn't sent or forwarded anything aside from a ping, or possibly bad packets).
Reply With Quote