It's hard to say without knowing the protocol.
Is it telnet?
If so, how about
Net::Telnet
or
IO::Socket::Telnet
?
You can pick these up on Cpan. | [reply] [Watch: Dir/Any] |
I believe the protocol used is tcp. Can I send the user name to the server by just printing to the socket or is there another way?
| [reply] [Watch: Dir/Any] |
TCP isn't precise enough.
Imagine two people communicating.
They can communicate in English, in French, etc.
They can communicate verbally, in writing, etc
They can communicate over a phone, using snail mail, using a video, etc.
By picking TCP, you picked something from the second line, but you still have haven't picked a language.
Is it a Telnet server? an SSH server? HTTP? FTP? ...
| [reply] [Watch: Dir/Any] |
| [reply] [Watch: Dir/Any] |
The chat client will first have to connect to the academic server and establish a connection with that server before it can login to the chat server (which is running on the academic server). I tried using "use Net::SSH::Perl" and adding this code line to connect to the server using ssh: sub server {
my $ssh = Net::SSH::Perl->new($host);
$ssh->login('uas');
&init_connect;
}
and got this error in the terminal:
*** unhandled exception in callback:
*** The getpwuid function is unimplemented at C:/Perl/site/lib/Net/SSH/Perl.pm
line 110.
*** ignoring at C:\Documents and Settings\Jamie\Desktop\simple-client.pl line 7
0. a password should not be needed since its using a authentication key. I should also note that the chat client connects to the chat server using IO::Socket::INET.
| [reply] [Watch: Dir/Any] |