Click here to Skip to main content
15,916,463 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using Arabic Character in the MFC Pin
Carlos Antollini8-Apr-02 5:43
Carlos Antollini8-Apr-02 5:43 
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 
I am driven to the wall. Can anyone help me?
I have a server and a client both use TCP/IP socket. The server runs Vxworks while the client runs Windows 2000. the requrirement is that the server can have one client only at a time, so when I initialize the server socket, I say:
nRet = listen(ListenSocket, 1);
But still, when I run two clients to test it, both can connect()!!!
And when I check the messages received by the server,
if ( FD_ISSET(ListenSocket, &ReadSet) && ClientSocket == 0)
    HandleNewConnection();
else    
    logMsg("don't accept\n", 1, 2, 3, 4, 5, 6);

I will see that: after the first client successfully connected to the server (ClientSocket != 0 then), I let the second client try to connect to the server. The client will tell me its connect() okay, while the server will say "don't accept\n" all the time until the second client close the connection.

What's the use of the MAX_CONNECTION = 1 in my listen() then??

Or if I over look something?

any help is highly appreciated!
GeneralRe: listen() problem Pin
Bob Groves8-Apr-02 9:15
Bob Groves8-Apr-02 9:15 
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 

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.