Home » Community » Newbie corner » Socket - send multiple lines
Re: Socket - send multiple lines [message #29832 is a reply to message #29830] |
Sun, 21 November 2010 00:24   |
|
Hi Neil,
In most cases '\n' is just a character like any other. I think the only cases where it can be dropped is when using "readline" type of functions (such as GetStdIn() or Socket::ReadLine()), at least in U++. Other languages/frameworks might have different traditions.
The '\n' is AFAIK never replaced by '\0'. End of line is a part of string (or char array) and as such it should stay where you put it. Only if the reading procedure drops it, it might appear that '\0' is in its place, but it is actually at the end of any null terminated string (actually there are some cases when a string can end with non-null value, but that is usually weird, confusing and probably not important here).
Honza
|
|
|
Goto Forum:
Current Time: Sun Jun 08 00:37:13 CEST 2025
Total time taken to generate the page: 0.03567 seconds
|