Click here to Skip to main content
15,923,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to terminate the secondary thread when the application closed? Pin
Rajesh R Subramanian26-Aug-09 5:05
professionalRajesh R Subramanian26-Aug-09 5:05 
AnswerRe: How to terminate the secondary thread when the application closed? Pin
David Crow26-Aug-09 2:51
David Crow26-Aug-09 2:51 
QuestionAfter SuspendThread Messagebox not working. Pin
Le@rner26-Aug-09 0:13
Le@rner26-Aug-09 0:13 
AnswerRe: After SuspendThread Messagebox not working. Pin
Stephen Hewitt26-Aug-09 0:21
Stephen Hewitt26-Aug-09 0:21 
AnswerRe: After SuspendThread Messagebox not working. Pin
Cedric Moonen26-Aug-09 0:22
Cedric Moonen26-Aug-09 0:22 
AnswerRe: After SuspendThread Messagebox not working. Pin
Rajesh R Subramanian26-Aug-09 0:27
professionalRajesh R Subramanian26-Aug-09 0:27 
QuestionTCP/IP Message Framing and Parsing [modified] Pin
staticv26-Aug-09 0:13
staticv26-Aug-09 0:13 
AnswerRe: TCP/IP Message Framing and Parsing Pin
Stuart Dootson26-Aug-09 3:43
professionalStuart Dootson26-Aug-09 3:43 
Ahmed Manzoor wrote:
I thought of one way was that I should append a termination string in the end of the message. But others said that prefixing the message length is far more better?


Prefix the length. That gives you a definite message length, which lets you detect errors better.

Say you had a termination string and the packet containing the termination string was lost. Your program would keep searching and either a) never see the terminator, so think the message never ended, or b) see the wrong terminator (maybe from the next message) and merge two messages into one.

Ahmed Manzoor wrote:
And, by the way, what is the minimum amount of bytes/bits that will successfully transfer in one shot using TCP/IP?


No minimum really - but you need to turn off the Nagle algorithm (see setsockopt and TCP_NODELAY[^]).

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: TCP/IP Message Framing and Parsing Pin
staticv26-Aug-09 17:16
staticv26-Aug-09 17:16 
GeneralRe: TCP/IP Message Framing and Parsing Pin
Stuart Dootson26-Aug-09 21:20
professionalStuart Dootson26-Aug-09 21:20 
GeneralRe: TCP/IP Message Framing and Parsing Pin
Moak26-Aug-09 21:22
Moak26-Aug-09 21:22 
GeneralRe: TCP/IP Message Framing and Parsing Pin
staticv26-Aug-09 21:40
staticv26-Aug-09 21:40 
QuestionNo Word Wrap at CR or LF or CRLF Pin
thomasIC26-Aug-09 0:04
thomasIC26-Aug-09 0:04 
AnswerRe: No Word Wrap at CR or LF or CRLF Pin
«_Superman_»26-Aug-09 0:51
professional«_Superman_»26-Aug-09 0:51 
GeneralRe: No Word Wrap at CR or LF or CRLF Pin
thomasIC26-Aug-09 1:08
thomasIC26-Aug-09 1:08 
GeneralRe: No Word Wrap at CR or LF or CRLF Pin
«_Superman_»26-Aug-09 2:03
professional«_Superman_»26-Aug-09 2:03 
GeneralRe: No Word Wrap at CR or LF or CRLF Pin
thomasIC26-Aug-09 2:30
thomasIC26-Aug-09 2:30 
GeneralRe: No Word Wrap at CR or LF or CRLF Pin
David Crow26-Aug-09 3:00
David Crow26-Aug-09 3:00 
GeneralRe: No Word Wrap at CR or LF or CRLF Pin
thomasIC26-Aug-09 3:14
thomasIC26-Aug-09 3:14 
QuestionRe: No Word Wrap at CR or LF or CRLF Pin
David Crow26-Aug-09 3:18
David Crow26-Aug-09 3:18 
AnswerRe: No Word Wrap at CR or LF or CRLF Pin
thomasIC26-Aug-09 3:44
thomasIC26-Aug-09 3:44 
QuestionDirectx Pin
messages25-Aug-09 23:44
messages25-Aug-09 23:44 
AnswerRe: Directx Pin
Stuart Dootson26-Aug-09 3:50
professionalStuart Dootson26-Aug-09 3:50 
AnswerRe: Directx Pin
Stuart Dootson26-Aug-09 5:15
professionalStuart Dootson26-Aug-09 5:15 
Questionbyte to int -> bit shifting confusion [modified] Pin
Souldrift25-Aug-09 21:31
Souldrift25-Aug-09 21:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.