Hi, i run a phex as supernode on my ip and then i am trying to
connect to it using the following code:
my $header = 'GNUTELLA CONNECT/0.6' . LF; $header .= 'User-Agent: JTella 0.8' . LF; $header .= 'X-Ultrapeer: False' . LF; $header .= 'X-Ultrapeer-Needed: True' . LF; $header .= 'Remote-IP: 91.90.90.90' . LF; $header .= LF . LF; my $ultra_peer_host = '2XX.X02.XXX.XXX'; # '127.0.0.1'; my $ultra_peer_port = '59970'; #'59970'; $socket = new IO::Socket::INET( PeerAddr => $ultra_peer_host, PeerPort => $ultra_peer_port, Proto => 'tcp', Type => SOCK_STREAM, Timeout => 5 ) or die "can't connect to $ARGV[0]:$ARGV1: $@\n"; #$socket->autoflush(1); #$socket->blocking(0); print $socket $header; while (sysread($socket , $byte, 1) == 1) { print STDOUT $byte; } print $buf . " +++ \n";
but this doesn't work.
does someone know a solution? then please post it here!
thanks a lot.
Edited by planetscape - added code tags
In reply to Gnutella - Perl implementation problems by thecerial
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |