I have created a small TCP server application and attached it to this message.
Notice in server_thread.cpp, there are two "BOOKMARK" comments.
The user connects and types in some text, the server is supposed to echo it back to them preceded by two less-than symbols and one space ("<< ").
Notice that the number of bytes to write is ALWAYS four bytes more than what was read from the user (there's a print statement near both BOOKMARKs). Where are these four extra bytes coming from?
I've even tried taking out the "<< ", but that's not where the extra bytes are coming from.
Any suggestions would be appreciated.
Sincerely,
Gordon E.
Bookmarks