A socket is defined as one endpoint of a two-way communication link between two programs running on the network. A socket is bound to a port number so that the TCP layer can identify the application that data is destined to be sent.
Normally an FTP server runs on a specific machine and has a socket that is set to a specific port number. The server mainly waits and listens to the socket for a client to make a connection request. The client makes a connection request by trying to meet with the server on the server's machine and port. If everything goes well, the server accepts the connection. Upon acceptance, the server gets a new socket bound to the same port. It needs a new socket so that it can continue to listen to the original socket for connection requests from other clients while tending to the needs of the currently connected client. On the client side, if the connection is accepted, a socket is successfully created and the client can use the socket to communicate with the server. The client and server can now communicate by writing to or reading from their sockets.
A socket error can occur if one or more of the above conditions are not met or something is blocking communication between the client and server (e.g. firewall, anti-virus). Additionally, a client connection can already be established with a server when a socket error occurs such as in cases when the network connection goes down or the host that the client connects to suddenly crashes or reboots.
Note:
Along with the errors listed above, there are several other socket errors that can possibly occur. If you are receiving a socket error code that is not listed above, please refer to the following MSDN site for a complete listing:
Additionally, if you are encountering any FTP related issues, we strongly suggest that you test the transmission with other FTP clients. This is a good method in determining the root of the problem. Keep in mind that when you are having similar problematic behavior in multiple clients against the same server, it's more than likely a server problem, and needs a support ticket.