Click here to Skip to main content
15,899,313 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: strange realization of StrToD() Pin
JackDingler31-Jan-12 11:54
JackDingler31-Jan-12 11:54 
GeneralRe: strange realization of StrToD() Pin
a_matseevsky31-Jan-12 12:32
a_matseevsky31-Jan-12 12:32 
QuestionC program to extract values from EXCEL file Pin
Faez Shingeri31-Jan-12 1:46
Faez Shingeri31-Jan-12 1:46 
AnswerRe: C program to extract values from EXCEL file Pin
CPallini31-Jan-12 2:35
mveCPallini31-Jan-12 2:35 
QuestionRe: C program to extract values from EXCEL file Pin
Faez Shingeri31-Jan-12 17:33
Faez Shingeri31-Jan-12 17:33 
AnswerRe: C program to extract values from EXCEL file Pin
CPallini31-Jan-12 21:44
mveCPallini31-Jan-12 21:44 
GeneralRe: C program to extract values from EXCEL file Pin
Faez Shingeri31-Jan-12 22:51
Faez Shingeri31-Jan-12 22:51 
Questionfirmware coding in C Pin
Ebe7230-Jan-12 23:16
Ebe7230-Jan-12 23:16 
AnswerRe: firmware coding in C Pin
Richard MacCutchan30-Jan-12 23:37
mveRichard MacCutchan30-Jan-12 23:37 
AnswerRe: firmware coding in C Pin
CPallini31-Jan-12 2:25
mveCPallini31-Jan-12 2:25 
AnswerRe: firmware coding in C Pin
Bram van Kampen31-Jan-12 12:27
Bram van Kampen31-Jan-12 12:27 
AnswerRe: firmware coding in C Pin
Erudite_Eric31-Jan-12 21:05
Erudite_Eric31-Jan-12 21:05 
Question::ifstream.open behaves differently in VC6 and VS2010 Pin
KASR130-Jan-12 22:31
KASR130-Jan-12 22:31 
AnswerRe: ::ifstream.open behaves differently in VC6 and VS2010 Pin
CPallini30-Jan-12 22:42
mveCPallini30-Jan-12 22:42 
GeneralRe: ::ifstream.open behaves differently in VC6 and VS2010 Pin
KASR131-Jan-12 3:24
KASR131-Jan-12 3:24 
AnswerRe: ::ifstream.open behaves differently in VC6 and VS2010 Pin
Albert Holguin31-Jan-12 3:37
professionalAlbert Holguin31-Jan-12 3:37 
GeneralRe: ::ifstream.open behaves differently in VC6 and VS2010 Pin
KASR131-Jan-12 3:42
KASR131-Jan-12 3:42 
AnswerRe: ::ifstream.open behaves differently in VC6 and VS2010 Pin
Albert Holguin31-Jan-12 5:17
professionalAlbert Holguin31-Jan-12 5:17 
GeneralRe: ::ifstream.open behaves differently in VC6 and VS2010 Pin
KASR11-Feb-12 7:29
KASR11-Feb-12 7:29 
Questionbasic Winsock / IOCP / UDP question Pin
SledgeHammer0130-Jan-12 13:01
SledgeHammer0130-Jan-12 13:01 
AnswerRe: basic Winsock / IOCP / UDP question Pin
Jochen Arndt30-Jan-12 22:19
professionalJochen Arndt30-Jan-12 22:19 
GeneralRe: basic Winsock / IOCP / UDP question Pin
SledgeHammer0131-Jan-12 5:01
SledgeHammer0131-Jan-12 5:01 
GeneralRe: basic Winsock / IOCP / UDP question Pin
Jochen Arndt31-Jan-12 5:51
professionalJochen Arndt31-Jan-12 5:51 
GeneralRe: basic Winsock / IOCP / UDP question Pin
SledgeHammer0131-Jan-12 6:27
SledgeHammer0131-Jan-12 6:27 
Thank you very much.

One final question Smile | :) . Seems like a common UDP loop is pretty similiar to the common TCP loop:

while (1)
{
int i = recvFrom(...);

// do stuff
}

so, I may be misunderstanding, but say I have 10,000 clients in say a game perhaps, or whatever. They might send me a "here is my new position" UDP packet and then I'd have to send out a "here is user x's new position" UDP packet.

So with a single thread, wouldn't the loop be something like:

while (1)
{
int i = recvFrom(...);

UpdatePosition(recvBuff);

for (int j = 0; j < 10000; j++)
SendPositionUpdate();
}

if I got 100 position updates, I'd have to send out 10000 * 100 position updates to the clients (I know there is multi-cast Smile | :) , but I'm trying to figure out the basic concept at this point Smile | :) ).

point is... I'd have to finish sending out recv #1's 10000 notification packets before I ever got to servicing recv #2??

Maybe I need to get all available recv's in each iteration and then just send out 10000 notifications once?

Just trying to figure out how this stuff is implemented in the real world Smile | :) .
GeneralRe: basic Winsock / IOCP / UDP question Pin
Jochen Arndt31-Jan-12 6:43
professionalJochen Arndt31-Jan-12 6:43 

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.