Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Socket gripes

by sch (Pilgrim)
on Oct 25, 2002 at 14:35 UTC ( #208011=note: print w/ replies, xml ) Need Help??


in reply to Socket gripes

I suspect that the read you're doing is waiting for a \n or \r before returning and that your server isn't supplying one - I had a similar problem on some socket code I was working with and the problem was solved by using sysread.

But today you took me walking, Through a land that we have lost,
While our children sit at websites, With no access to the cost


Comment on Re: Socket gripes
Re: Re: Socket gripes
by frankus (Priest) on Oct 25, 2002 at 14:46 UTC
    Cheers for the prompt response.

    The problems I percieve with this are that the return data already stretches over several lines and contains a return character at the end of each line..

    If you mean it needs a return character after the last line..
    I am loathe to add an extra return character to provide Perl with a quick fix, when it may inpinge on other clients in other languages.

    --

    Brother Frankus.

      As a test, and to see if the return is the problem, could I suggest using sysread to read back 1 character at a time to see if you get stuff returned immediately or whether it still sits waiting.

      But today you took me walking, Through a land that we have lost,
      While our children sit at websites, With no access to the cost

        I think I've found the answer to my problems and it stems from the fact that I'm writing a bi-directional client.. So I'm trying the example in the Cookbook for this.

        --

        Brother Frankus.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://208011]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (15)
As of 2015-07-06 20:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (82 votes), past polls