sockets – C# An established connection was aborted by the software in your host machine
An established connection was aborted by the software in your host machine
That is a boiler-plate error message, it comes out of Windows. The underlying error code is WSAECONNABORTED. Which really doesnt mean more than connection was aborted. You have to be a bit careful about the your host machine part of the phrase. In the vast majority of Windows application programs, it is indeed the host that the desktop app is connected to that aborted the connection. Usually a server somewhere else.
The roles are reversed however when you implement your own server. Now you need to read the error message as aborted by the application at the other end of the wire. Which is of course not uncommon when you implement a server, client programs that use your server are not unlikely to abort a connection for whatever reason. It can mean that a fire-wall or a proxy terminated the connection but thats not very likely since they typically would not allow the connection to be established in the first place.
You dont really know why a connection was aborted unless you have insight what is going on at the other end of the wire. Thats of course hard to come by. If your server is reachable through the Internet then dont discount the possibility that you are being probed by a port scanner. Or your customers, looking for a game cheat.
This problem appear if two software use same port for connecting to the server
try to close the port by cmd according to your operating system
then reboot your Android studio or your Eclipse or your Software.