Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: udp sockets Pin
S Douglas5-Jun-05 4:23
professionalS Douglas5-Jun-05 4:23 
Generalunc Pin
Usman Tasleem Akshaf4-Jun-05 22:42
Usman Tasleem Akshaf4-Jun-05 22:42 
GeneralRe: unc Pin
S Douglas4-Jun-05 23:09
professionalS Douglas4-Jun-05 23:09 
Generalsend mail without email account Pin
Member 19862964-Jun-05 22:16
Member 19862964-Jun-05 22:16 
GeneralRe: send mail without email account Pin
Carsten Zeumer5-Jun-05 0:07
Carsten Zeumer5-Jun-05 0:07 
GeneralRe: send mail without email account Pin
ThatsAlok5-Jun-05 21:13
ThatsAlok5-Jun-05 21:13 
Questionsendto and recvfrom keep grouping packets together?? Pin
KellyR4-Jun-05 21:13
KellyR4-Jun-05 21:13 
AnswerRe: sendto and recvfrom keep grouping packets together?? Pin
Andrew Walker4-Jun-05 22:06
Andrew Walker4-Jun-05 22:06 
No, because TCP is a streaming protocol.

Because TCP is reliable (in-order and reliable), you can however wait until you have read a certain number of bytes and then assume that is one 'packet'.


For fixed size packets this means you end up with something like

read( packet, sizeof(Packet) )
read( packet, sizeof(Packet) )


And for variable size packets:

read( packetsize, sizeof(long) )
read( packet, packetsize)
read( packetsize, sizeof(long) )
read( packet, packetsize)

As an aside, ::send() and ::sendto() are generally used for UDP, whilst TCP normally only uses ::send()





GeneralRe: sendto and recvfrom keep grouping packets together?? Pin
KellyR5-Jun-05 5:21
KellyR5-Jun-05 5:21 
GeneralDisabling toolbutton Pin
laiju4-Jun-05 21:06
laiju4-Jun-05 21:06 
GeneralRe: Disabling toolbutton Pin
PJ Arends4-Jun-05 21:35
professionalPJ Arends4-Jun-05 21:35 
GeneralRe: Disabling toolbutton Pin
laiju5-Jun-05 1:13
laiju5-Jun-05 1:13 
GeneralRe: Disabling toolbutton Pin
PJ Arends6-Jun-05 10:27
professionalPJ Arends6-Jun-05 10:27 
QuestionBooks for windows graphics programming??? Pin
VikramDelhi4-Jun-05 20:38
VikramDelhi4-Jun-05 20:38 
GeneralVC and DOS Pin
Usman Tasleem Akshaf4-Jun-05 17:57
Usman Tasleem Akshaf4-Jun-05 17:57 
GeneralRe: VC and DOS Pin
Ravi Bhavnani4-Jun-05 18:11
professionalRavi Bhavnani4-Jun-05 18:11 
Generalvisual c++ 2003 "Go To Reference" disabled Pin
Anonymous4-Jun-05 17:36
Anonymous4-Jun-05 17:36 
GeneralRe: visual c++ 2003 "Go To Reference" disabled Pin
Nilesh K.5-Jun-05 23:06
Nilesh K.5-Jun-05 23:06 
GeneralSerialization between 32 and 64 bits Pin
nemo4-Jun-05 9:05
nemo4-Jun-05 9:05 
GeneralAfxGetApp()->m_pMainWnd in a DLL? [Edit] Pin
Mitch F.4-Jun-05 6:58
Mitch F.4-Jun-05 6:58 
GeneralRe: AfxGetApp()->m_pMainWnd in a DLL? [Edit] Pin
PJ Arends4-Jun-05 9:52
professionalPJ Arends4-Jun-05 9:52 
GeneralRe: AfxGetApp()->m_pMainWnd in a DLL? [Edit] Pin
ThatsAlok5-Jun-05 17:51
ThatsAlok5-Jun-05 17:51 
GeneralMeaning of JB *+3 Pin
Franz Klein4-Jun-05 6:50
Franz Klein4-Jun-05 6:50 
GeneralRe: Meaning of JB *+3 Pin
Monty24-Jun-05 20:36
Monty24-Jun-05 20:36 
GeneralRe: Meaning of JB *+3 Pin
ThatsAlok5-Jun-05 17:49
ThatsAlok5-Jun-05 17:49 

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.