Winsock: "Connection is forcefully rejected" error
I have written two programs, a client and server program. The client connects to the server, the server sends data and then closes the connection, then goes back to listen for more connections. The client connects fine, and everything goes like it should, but when I try to connect again (without resetting the server) I get a "Connection is forcefully rejected" error. Why? The server's state is 2 (listening).
Disiance
Re: Winsock: "Connection is forcefully rejected" error
Quote:
Originally Posted by
Disiance
The client connects just fine, receives the data, and then disconnects. I get the error when it tries to connect a 2nd time. The only way to fix it that I've found is to close the server program and start it again.
Disiance
I know it's an old post, but I got the same error with same description.
Did you manage to solve it?
Thanks! ;)
Re: Winsock: "Connection is forcefully rejected" error
Quote:
Originally Posted by
beic
I know it's an old post, but I got the same error with same description.
Did you manage to solve it?
Thanks! ;)
As their last activity (check their profile) was 10 years ago, you probably won't get a response. The right thing to have done here is starting a new post describing your own issue and referencing this one so people know you've looked here.
Re: Winsock: "Connection is forcefully rejected" error
Quote:
Originally Posted by
beic
I know it's an old post, but I got the same error with same description.
Did you manage to solve it?
Thanks! ;)
The server implementation in this thread is bonkers. You don’t accept incomming connections on the listening socket they do.
Better start a new thread titled “How to write simple TCP server using Winsock control - samples” or similar.