I happened to be working on a TCP/IP server when this hit my desk
and having Programming Perl open to the correct page, thought I might as
well quote the "select..." line from the client code... 

select ((select(Server), $| = 1)[0];    
print Server "Howdy\n"; 
$answer = <Server>;  

        from p 440 of the 3rd edition.  Hope that helps, I've done servers
lots more than clients...
-Chris 

-----Original Message-----
From: James Edward Gray II [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 01, 2003 1:38 PM
To: Kipp, James
Cc: '[EMAIL PROTECTED]' List
Subject: Re: Can' t read all bytes from Socket

On Dec 1, 2003, at 2:31 PM, Kipp, James wrote:

>>> Thanks. I tried turning off buffering on both ends, that
>> did not work.
>>
>> In your example, you only call sysread() once.  Is that how you were
>> doing it?  If so, that's the mistake.  The one call got you
>> part of the
>> data.  Then you would loop, check and eventually call again
>> to get the
>> rest.  Make sense?
>
> Yes, make sense, but not sure how to "check". Is this where select() 
> comes
> in?

You got it.

> Let me know if you want to see the entire code I am currently working 
> with.

Sure, especially if your client and server are small, post away.  Tell 
me what you're really trying to create too.

James


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to