Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Answer: Can I read a line from a socket without the socket sending \n?

( #44174=categorized answer: print w/ replies, xml ) Need Help??

Q&A > network programming > Can I read a line from a socket without the socket sending \n? contributed by merlyn

The hardest part about sockets is knowing when to stop reading. You can invent a line-oriented protocol, or use some other indication (like a byte count followed by that many bytes).

Knowing what to use is an art call, decided by experience and study of the prior art. Good luck in your quest!

Comment on Answer: Can I read a line from a socket without the socket sending \n?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2014-12-27 17:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls