Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: pragma once faster as an include guards? Pin
Zac Howland20-Nov-06 5:35
Zac Howland20-Nov-06 5:35 
GeneralRe: pragma once faster as an include guards? Pin
User 58261920-Nov-06 8:35
User 58261920-Nov-06 8:35 
GeneralRe: pragma once faster as an include guards? Pin
Zac Howland20-Nov-06 8:44
Zac Howland20-Nov-06 8:44 
GeneralRe: pragma once faster as an include guards? Pin
Nemanja Trifunovic20-Nov-06 10:49
Nemanja Trifunovic20-Nov-06 10:49 
AnswerRe: pragma once faster as an include guards? [modified] Pin
Michael Dunn20-Nov-06 8:06
sitebuilderMichael Dunn20-Nov-06 8:06 
GeneralRe: pragma once faster as an include guards? Pin
User 58261920-Nov-06 8:22
User 58261920-Nov-06 8:22 
GeneralRe: pragma once faster as an include guards? Pin
Stephen Hewitt20-Nov-06 12:12
Stephen Hewitt20-Nov-06 12:12 
GeneralRe: pragma once faster as an include guards? Pin
Jörgen Sigvardsson20-Nov-06 12:24
Jörgen Sigvardsson20-Nov-06 12:24 
GeneralRe: pragma once faster as an include guards? Pin
Stephen Hewitt20-Nov-06 12:29
Stephen Hewitt20-Nov-06 12:29 
AnswerRe: pragma once faster as an include guards? Pin
Blake Miller22-Nov-06 3:53
Blake Miller22-Nov-06 3:53 
QuestionUnique Question .... Pin
Programm3r20-Nov-06 4:04
Programm3r20-Nov-06 4:04 
AnswerRe: Unique Question .... Pin
led mike20-Nov-06 4:48
led mike20-Nov-06 4:48 
GeneralRe: Unique Question .... Pin
Programm3r20-Nov-06 4:51
Programm3r20-Nov-06 4:51 
GeneralRe: Unique Question .... Pin
led mike20-Nov-06 5:27
led mike20-Nov-06 5:27 
GeneralRe: Unique Question .... Pin
Programm3r20-Nov-06 19:23
Programm3r20-Nov-06 19:23 
AnswerRe: Unique Question .... Pin
Zac Howland20-Nov-06 5:39
Zac Howland20-Nov-06 5:39 
GeneralRe: Unique Question .... Pin
Programm3r20-Nov-06 19:20
Programm3r20-Nov-06 19:20 
GeneralRe: Unique Question .... Pin
Zac Howland21-Nov-06 3:32
Zac Howland21-Nov-06 3:32 
AnswerRe: Unique Question .... Pin
Scott Holt20-Nov-06 14:51
Scott Holt20-Nov-06 14:51 
You're right, its hard to see exactly what you are doing from such a short code snippet. Is it safe to assume that you are using the WinSock library? If so, your server-side program is listening for incoming connections on a specific port, right? When a client requests a connection, and the server accepts it, the server should spawn a thread for that specific connection, then continue listening for another connection while the thread handles the client that just connected. The server keeps a "global" array of 'gConnectData' structures as well as an index into the array. For each client connection, the INDEX is incremented and passed to the thread that handles the client connection, therefore keeping each thread from "bumping" into any other threads as they access the array.

There is a good book entitled "Windows Sockets Network Programming", by Bob Quinn and Dave Shute, that provides good working examples of this type of application.

Not sure if I've helped you any or completely misunderstood your problem.

Scott
Confused | :confused:
GeneralRe: Unique Question .... Pin
Programm3r20-Nov-06 19:26
Programm3r20-Nov-06 19:26 
QuestionRe: Unique Question .... Pin
Programm3r20-Nov-06 19:53
Programm3r20-Nov-06 19:53 
QuestionRe: Unique Question .... Pin
Zac Howland21-Nov-06 3:35
Zac Howland21-Nov-06 3:35 
AnswerRe: Unique Question .... Pin
led mike21-Nov-06 4:43
led mike21-Nov-06 4:43 
QuestionConvert pdf to tiff Pin
Dudi Avramov20-Nov-06 3:58
Dudi Avramov20-Nov-06 3:58 
AnswerRe: Convert pdf to tiff Pin
Waldermort20-Nov-06 5:22
Waldermort20-Nov-06 5:22 

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.