I've the following problem. I've a Server Application that accepts sockets connections wrapped over SSL. The client sends user and password over it, once on the Server I check if the user/password is correct.
If the user/password is wrong I want the Server to send to the Client a Socket.error. Right now the only idea that comes to mind is sending back to the client "Wrong Password" but I think it is safer to use the built-in errors, this way I can warp the code over a try except statement.
Is it there anyway to send a socket error from the Server to the Client?
The easiest method would be to send back some sort of return code and when the client sees the return code from the server, it would throw the exception itself.
Raising socket.error from client to server