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

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

Thread Next
From:
Hewlett Pickens
Date:
January 31, 2002 10:52
Subject:
Access Transmitted Data On "Server" Side Of A TCP Socket
Message ID:
99FD2A07ACECD411942E0040AA44B1901371FF@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.



Thread Next


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