Hi Monks ,
I wrote this simple code because I just want to send some information to a device , the program sends the query (I used wireshark and saw the package leaving corrertly my machine and the device responded correctly too ) but I can't recieve this info in my program and i don't know what to do , here is the code
use IO::Socket; #Sender my $send = new IO::Socket::INET ( PeerAddr => '192.168.11.244', PeerPort => '6008', Proto => 'tcp', ); die "Couldn't Send: $!\n" unless $send; #Reciever my $recieve = new IO::Socket::INET ( LocalHost => '192.168.11.136', LocalPort => '6008', Proto => 'tcp', Listen => 1, Reuse => 1, ); die "Couldn't Recieve: $!\n" unless $recieve; $data = pack("CccccccCcCC",02,65,63,80,81,76,86,03,100,13,10); print $send $data ; #close($send); my $new_sock = $recieve->accept(); while(<$new_sock>) { print $_; } close($recieve);
I appreciate any help!
Thanks in advanced!
In reply to IO::Socket Listen by Secalles
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |