Click here to Skip to main content
15,888,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: basic Winsock / IOCP / UDP question Pin
SledgeHammer0131-Jan-12 6:58
SledgeHammer0131-Jan-12 6:58 
GeneralRe: basic Winsock / IOCP / UDP question Pin
Jochen Arndt31-Jan-12 7:14
professionalJochen Arndt31-Jan-12 7:14 
GeneralRe: basic Winsock / IOCP / UDP question Pin
SledgeHammer0131-Jan-12 7:19
SledgeHammer0131-Jan-12 7:19 
GeneralRe: basic Winsock / IOCP / UDP question Pin
SledgeHammer0131-Jan-12 14:12
SledgeHammer0131-Jan-12 14:12 
GeneralRe: basic Winsock / IOCP / UDP question Pin
Jochen Arndt31-Jan-12 21:25
professionalJochen Arndt31-Jan-12 21:25 
GeneralRe: basic Winsock / IOCP / UDP question Pin
SledgeHammer011-Feb-12 6:52
SledgeHammer011-Feb-12 6:52 
GeneralRe: basic Winsock / IOCP / UDP question Pin
Jochen Arndt1-Feb-12 7:35
professionalJochen Arndt1-Feb-12 7:35 
GeneralRe: basic Winsock / IOCP / UDP question Pin
SledgeHammer011-Feb-12 7:53
SledgeHammer011-Feb-12 7:53 
GeneralRe: basic Winsock / IOCP / UDP question Pin
Jochen Arndt1-Feb-12 8:00
professionalJochen Arndt1-Feb-12 8:00 
GeneralRe: basic Winsock / IOCP / UDP question Pin
SledgeHammer011-Feb-12 8:09
SledgeHammer011-Feb-12 8:09 
GeneralRe: basic Winsock / IOCP / UDP question Pin
SledgeHammer011-Feb-12 8:19
SledgeHammer011-Feb-12 8:19 
GeneralRe: basic Winsock / IOCP / UDP question Pin
SledgeHammer011-Feb-12 8:31
SledgeHammer011-Feb-12 8:31 
GeneralRe: basic Winsock / IOCP / UDP question Pin
SledgeHammer011-Feb-12 11:10
SledgeHammer011-Feb-12 11:10 
GeneralRe: basic Winsock / IOCP / UDP question Pin
Jochen Arndt1-Feb-12 21:04
professionalJochen Arndt1-Feb-12 21:04 
QuestionLINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12 Pin
KASR130-Jan-12 4:01
KASR130-Jan-12 4:01 
AnswerRe: LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12 Pin
Chris Losinger30-Jan-12 4:37
professionalChris Losinger30-Jan-12 4:37 

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.