Home > Software engineering > Use MFC and socket wrote the service side, the test client start to connect is always wrong
Use MFC and socket wrote the service side, the test client start to connect is always wrong
Time:10-25
What I write is PC entrance guard personnel information management system, can accept from the machine is receiving data, and lower machine communication online example of this I like writing, similar to the instant messaging software, now have the following problems 1. Bring out the module used alone, to test the link with the client, and there is no problem, you can link, also can communicate, as shown in figure:
2. Now I add the separate modules to my personnel information management system, using the client connection, can appear error, to start listening to the port, the client connect to the server, the program is error Under 3. Could you please tell me if this is due to the reason of thread application error, my original idea is to click on the button to start listening to will open up a new thread, which interface disappeared can continue to receive the client sends data, and deposited in the database,
4. Before had not learned C/C + +, this is a little bit to find information online written mimic other people's code, so please prawn people to answer the question when specific point! Please! 5. And I always can not put, don't know how to give points
CodePudding user response:
Collapsed in the pop-up dialog box, press the corresponding button to enter debugging press Alt + 7 key to view the Call Stack, namely "the Call Stack" from the inside to the following out of from the inner to outer function Call history, double-click a row to the cursor to the Call of the source code or assembly instruction, don't understand when double click on the next line, until we can read ,
CodePudding user response:
First take a look at your code error call stack location, see some phenomenon should be a pointer initialization etc. There is a problem, after you put the thread, whether some initialization actions to do