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

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

From:
jm5379
Date:
January 31, 2002 11:22
Subject:
RE: Access Transmitted Data Received On "Server" Side Of A TCP Socket
Message ID:
CB6945779613D311BD2E0008C7CBB0BD0375E36F@d6400057.sbc.com
Hew,

I've never delved into this area at all, but looking at your code, shouldn't
you have 
Proto    => "tcp",
in the IO:::Socket... on server as well as client?

Joe


-----Original Message-----
From: Hewlett Pickens [mailto:HPickens@bimoyle.com]
Sent: Thursday, January 31, 2002 12:50 PM
To: beginners@perl.org
Subject: Access Transmitted Data Received On "Server" Side Of A TCP
Socket


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