Trancemission
Technical User
I have been using PERL for over 6 months now on and off and I must say I a coming along quite nicely.
My next project involces creating a set of scripts that will allow data to be passed from a client to a server. It is only a v.small amount of data.
I have setup a simple server using the USE:IO:Socket module:
$local = IO::Socket::INET->new(Proto=>"tcp", LocalPort=>"200",Listen=>"1"
or die "Cannot open socket\n";
$remote = $local->accept;
When I telnet onto the port when this is listening I am assuming that data is only sent when I hit the enter key becuase when I put:
while(<$remote>){
print;
}
It prints the data on the server terminal when I hit enter.
The data that I will be passing is
Swtich name - London
status - Down
condition - OSPF Process failed
I will then insert these into a mysql table in a DB. Any help on this would be appreciated. (I am okay with the syntax of accessing mysql but need help in getting the data ffrom the client and breaking it down.
Thus I also need to create the 'client' and I am not sure how to do this. I could use a telnet module but I would prefer to have my own 'client' that initiates a session and then sends data over the session.
Many Thanks
Trancemission
=============
If it's logical, it'll work!
My next project involces creating a set of scripts that will allow data to be passed from a client to a server. It is only a v.small amount of data.
I have setup a simple server using the USE:IO:Socket module:
$local = IO::Socket::INET->new(Proto=>"tcp", LocalPort=>"200",Listen=>"1"
or die "Cannot open socket\n";
$remote = $local->accept;
When I telnet onto the port when this is listening I am assuming that data is only sent when I hit the enter key becuase when I put:
while(<$remote>){
print;
}
It prints the data on the server terminal when I hit enter.
The data that I will be passing is
Swtich name - London
status - Down
condition - OSPF Process failed
I will then insert these into a mysql table in a DB. Any help on this would be appreciated. (I am okay with the syntax of accessing mysql but need help in getting the data ffrom the client and breaking it down.
Thus I also need to create the 'client' and I am not sure how to do this. I could use a telnet module but I would prefer to have my own 'client' that initiates a session and then sends data over the session.
Many Thanks
Trancemission
=============
If it's logical, it'll work!