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 #11091 is a reply to message #11063] Sun, 19 August 2007 14:23 Go to previous messageGo to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
luzr wrote on Fri, 17 August 2007 18:21

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


Mirek, could you put that into FAQ's "about endlines" (or similar), please?

This really looks like the third STUPIPHIC way, then.
STrange Unexpected soPHisticated specifIC Smile

lectus, sorry for trying to confuse you about those endlines.
 
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: Wed May 15 19:39:52 CEST 2024

Total time taken to generate the page: 0.03353 seconds