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

C / C++ / MFC

 
GeneralRe: Synchronous/Ascynchronous sockets Pin
led mike22-Jun-06 7:22
led mike22-Jun-06 7:22 
GeneralRe: Synchronous/Ascynchronous sockets Pin
Zac Howland22-Jun-06 7:24
Zac Howland22-Jun-06 7:24 
GeneralRe: Synchronous/Ascynchronous sockets Pin
CMas0722-Jun-06 5:58
CMas0722-Jun-06 5:58 
GeneralRe: Synchronous/Ascynchronous sockets Pin
Zac Howland22-Jun-06 6:18
Zac Howland22-Jun-06 6:18 
QuestionRe: Synchronous/Ascynchronous sockets Pin
CMas075-Jul-06 3:34
CMas075-Jul-06 3:34 
AnswerRe: Synchronous/Ascynchronous sockets Pin
Zac Howland5-Jul-06 4:44
Zac Howland5-Jul-06 4:44 
GeneralRe: Synchronous/Ascynchronous sockets Pin
CMas075-Jul-06 5:02
CMas075-Jul-06 5:02 
GeneralRe: Synchronous/Ascynchronous sockets Pin
Zac Howland5-Jul-06 5:13
Zac Howland5-Jul-06 5:13 
CMas07 wrote:
DOH! I should've seen that myself, but I suppose stupidity had set in at that point after hours and hours of frantically searching through my client to catch the non-existent bug.


We all get those from time to time. Smile | :)


CMas07 wrote:
However, this would create a thread per client, which is what I was trying to avoid, so I thought storing them in a vector would be able to keep them all alive, and then with the asynchronous server-side it would be able to simultaneously send to and receive from all clients (having the sends and receives each in one different thread to handle them), thus having a total of three threads.


Either way, you will need another thread to manage your active connections while your main thread is listening. If you do the sending/receiving to multiple clients in a single thread(s), make sure you use semaphores (aka Critical Sections) to protect the data you are sharring between threads.



If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac
AnswerRe: Synchronous/Ascynchronous sockets Pin
led mike22-Jun-06 5:34
led mike22-Jun-06 5:34 
GeneralRe: Synchronous/Ascynchronous sockets Pin
CMas0722-Jun-06 6:02
CMas0722-Jun-06 6:02 
Questionhow to open a *.txt file Pin
divisameer22-Jun-06 3:58
divisameer22-Jun-06 3:58 
AnswerRe: how to open a *.txt file Pin
toxcct22-Jun-06 3:59
toxcct22-Jun-06 3:59 
QuestionRe: how to open a *.txt file Pin
David Crow22-Jun-06 4:06
David Crow22-Jun-06 4:06 
AnswerRe: how to open a *.txt file Pin
Hamid_RT22-Jun-06 20:10
Hamid_RT22-Jun-06 20:10 
Questionvalues reading from a text document Pin
divisameer22-Jun-06 3:46
divisameer22-Jun-06 3:46 
AnswerRe: values reading from a text document Pin
_AnsHUMAN_ 22-Jun-06 3:50
_AnsHUMAN_ 22-Jun-06 3:50 
GeneralRe: values reading from a text document Pin
Cedric Moonen22-Jun-06 3:54
Cedric Moonen22-Jun-06 3:54 
GeneralRe: values reading from a text document Pin
toxcct22-Jun-06 3:58
toxcct22-Jun-06 3:58 
GeneralRe: values reading from a text document Pin
_AnsHUMAN_ 22-Jun-06 4:02
_AnsHUMAN_ 22-Jun-06 4:02 
AnswerRe: values reading from a text document Pin
Stephen Hewitt22-Jun-06 4:00
Stephen Hewitt22-Jun-06 4:00 
AnswerRe: values reading from a text document Pin
David Crow22-Jun-06 4:01
David Crow22-Jun-06 4:01 
AnswerRe: values reading from a text document Pin
Zac Howland22-Jun-06 4:11
Zac Howland22-Jun-06 4:11 
Questiondynamic radio button Pin
Tara1422-Jun-06 3:33
Tara1422-Jun-06 3:33 
QuestionRe: dynamic radio button Pin
David Crow22-Jun-06 3:37
David Crow22-Jun-06 3:37 
AnswerRe: dynamic radio button Pin
Tara1422-Jun-06 3:41
Tara1422-Jun-06 3:41 

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.