Tag Archives: network programming

Socket error 10053

socket error- Software caused connection abort. Error code : 10053

Action.c(16): Error : socket0 – Software caused connection abort. Error code : 10053.

This error is caused by socket communication process, which is usually like this :
normal C/S communication process is:
Server Listen;

Client Connect;

Server Accept;

Client Send;

Server Recv;

Client Close;

Server Close

If the Client side does not actively close the connection and directly exits, the Server side thread will cause an error of 10053 (this error usually does not affect much), and if the Server first actively closes the connection in the communication process, the Client side will also cause an error of 10053
When the network is down, it usually means that the Client thinks the Server is down and yells 10053

socket error 10035

The server got stuck when I was doing the test yesterday. I found that the server did not return the message when it called the send function. As a result, the thread of message processing was stuck there.
Based on the online data, I can probably tell that either the sender is out of cache or the receiver is out of cache.
And my socket is not set to non-blocking mode, so it’s stuck here with no return.
 
The solution is to change the socket to non-blocking mode

 
In this way, if the send fails, it can return immediately, and the server won’t be stuck there.
At this time, if the send is unsuccessful, the return value of the send is error 10035.
 
Then I checked the test client and realized that my client did not receive at all.
That’s weird.

Solution to Error 400. The request has an invalid header name

I encountered this problem today, and then Searched baidu, Bing and Google. I saw many blogs that wrote about this problem. To be honest, it was not helpful at all, so I spent 2 hours to find the reason by myself. The reason for this error is very simple. The reason for this error is that the header part is wrong. may be the direct cause of the error, as some browsers have different formats, which may lead to extra white space in the header information when you paste it into the code
I’m copying and pasting this piece of code when I add header information, is that okay?But if you look closely at the content-type part, isn’t there a lot of space?Just delete the Spaces and you’re done.
 
I modified

Crawl out of the data perfectly.
 
The first blog in my life, I hope you will pay more attention to me, I will continue to publish the blog about crawler in the future!!