Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » Non-Blocking socket example
Re: Socket example? [message #11063 is a reply to message #11032] Fri, 17 August 2007 19:21 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13976
Registered: November 2005
Ultimate Member
lectus wrote on Wed, 15 August 2007 14:33


What's right way to read and write lines from/to the client?
ReadRaw() looks OK for files. What about strings with \n at the end?



Well, "\n" / "\r\n" stupidity....

U++ way is to not to try some sort of automatic "text" translations (like those special binary/text modes in C fopen etc..) in streams.

In most cases, we prefer to manually supply '\r' on output and ignore it on input (only watch for '\n').

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon11.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Again ReadMemoryBarrier() etc
Next Topic: Threading example for U++
Goto Forum:
  


Current Time: Fri May 10 20:15:45 CEST 2024

Total time taken to generate the page: 0.01780 seconds