develooper Front page | perl.beginners | Postings from January 2002

Access Transmitted Data Received On "Server" Side Of A TCP Socket

From:
Hewlett Pickens
Date:
January 31, 2002 11:08
Subject:
Access Transmitted Data Received On "Server" Side Of A TCP Socket
Message ID:
99FD2A07ACECD411942E0040AA44B190137200@bimsrv03.bimoyle.com
Using O'Reilly's "Learning Perl", have set up a "bare bones" socket
connection between two computers to send a small amount of data from the
"client" to the "server".  (For learning, not for the real world.)

The client sends "are you there" and the server responds with "I am here,
what do you want".

Each side prints the data it receives.

The client correctly displays the received:  "I am here ..."

The server displays junk for the data its received, meaning I haven't
correctly acquired it.

Code snippets from the server and client are in the text attachment.  I'd
appreciate it if someone could point out the error I'm making in the server
code.

Thanks,

Hew

Hewlett M. Pickens
B I Moyle Associates, Inc.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About