bh_perl has asked for the wisdom of the Perl Monks concerning the following question:
hi..
I want to collect data from legacy switch to our server using XOT. The XOT port is 1998. All the data will be keep into specific filename.
I test the script, but its did not display the received packet or header packet.
Could somebody help me, how could i got the data and this is my coding
#!/usr/bin/perl use IO::Socket; $socket = new IO::Socket::INET ( PeerAddr => '19.25.15.15', PeerPort => 1998, Proto => 'tcp', ) or die "Couldn't connect to Server\n"; while (1) { $socket->recv($recv_data,10); print $recv_data."\n"; $send_data = <STDIN>; $socket->send($send_data); }
Thank you
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: help me on socket programming
by NetWallah (Canon) on Jul 12, 2013 at 05:14 UTC | |
by bh_perl (Monk) on Jul 12, 2013 at 07:05 UTC | |
by Utilitarian (Vicar) on Jul 12, 2013 at 08:37 UTC | |
by bh_perl (Monk) on Jul 12, 2013 at 09:24 UTC | |
by Utilitarian (Vicar) on Jul 12, 2013 at 11:23 UTC | |
by bh_perl (Monk) on Jul 13, 2013 at 03:17 UTC | |
|
Re: help me on socket programming
by Anonymous Monk on Jul 12, 2013 at 04:16 UTC | |
by bh_perl (Monk) on Jul 12, 2013 at 06:56 UTC |