Click here to Skip to main content
16,006,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using Arabic Character in the MFC Pin
Carlos Antollini8-Apr-02 5:44
Carlos Antollini8-Apr-02 5:44 
Generalhelp Pin
8-Apr-02 3:41
suss8-Apr-02 3:41 
GeneralProblems with accessing a control from another class Pin
James P8-Apr-02 3:22
James P8-Apr-02 3:22 
GeneralRe: Problems with accessing a control from another class Pin
Mazdak8-Apr-02 4:06
Mazdak8-Apr-02 4:06 
GeneralRe: Problems with accessing a control from another class Pin
James P8-Apr-02 5:31
James P8-Apr-02 5:31 
GeneralRe: Problems with accessing a control from another class Pin
Mazdak8-Apr-02 6:02
Mazdak8-Apr-02 6:02 
Generallisten() problem Pin
lucy8-Apr-02 3:21
lucy8-Apr-02 3:21 
GeneralRe: listen() problem Pin
Bob Groves8-Apr-02 9:15
Bob Groves8-Apr-02 9:15 
I have come across this before.

First off, I beleive the parameter to listen() is the queue size, so it is valid to be handling 1 call and having one in the queue.

Is there any reason you can only have one client? Typical pattern would be to have a server thread for each client.

One way I have seen your problem solved is to close the accepting socket straight after the first call to accept. The 2nd client will the get a connection refused error. When you server has finished with the 1st client, it can then re-open the accepting socket.

HTH Rob.

GeneralRe: listen() problem Pin
lucy9-Apr-02 4:05
lucy9-Apr-02 4:05 
GeneralRe: listen() problem Pin
Bob Groves9-Apr-02 4:08
Bob Groves9-Apr-02 4:08 
GeneralRe: listen() problem Pin
lucy9-Apr-02 5:20
lucy9-Apr-02 5:20 
GeneralRe: listen() problem Pin
Bob Groves9-Apr-02 6:01
Bob Groves9-Apr-02 6:01 
GeneralRe: listen() problem Pin
lucy9-Apr-02 7:17
lucy9-Apr-02 7:17 
GeneralRe: listen() problem Pin
Bob Groves9-Apr-02 22:20
Bob Groves9-Apr-02 22:20 
GeneralRe: listen() problem Pin
lucy10-Apr-02 3:05
lucy10-Apr-02 3:05 
Generalheader file used to access database in C++ Pin
tongc8-Apr-02 2:53
tongc8-Apr-02 2:53 
GeneralRe: header file used to access database in C++ Pin
Christian Graus8-Apr-02 3:00
protectorChristian Graus8-Apr-02 3:00 
GeneralRe: header file used to access database in C++ Pin
tongc8-Apr-02 3:07
tongc8-Apr-02 3:07 
GeneralCEdit Text Alignment Pin
Alex Deem8-Apr-02 2:37
Alex Deem8-Apr-02 2:37 
GeneralScroll bar in TreeCtrl Pin
8-Apr-02 2:33
suss8-Apr-02 2:33 
QuestionWhere comes the prerolling filter? Pin
Lizp8-Apr-02 2:13
Lizp8-Apr-02 2:13 
QuestionHow to get system color? Pin
Feng Qin8-Apr-02 1:30
Feng Qin8-Apr-02 1:30 
AnswerRe: How to get system color? Pin
8-Apr-02 1:44
suss8-Apr-02 1:44 
GeneralRe: How to get system color? Pin
Feng Qin8-Apr-02 1:49
Feng Qin8-Apr-02 1:49 
Questionhow can get the CPU info! Pin
wangyiming8-Apr-02 1:02
wangyiming8-Apr-02 1:02 

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.