case FD_CLOSE: s = INVALID_SOCKET; ssh_state = SSH_STATE_CLOSED; return 0;
static int ssh_msg (WPARAM wParam, LPARAM lParam) {    int ret;    char buf[256];    if (s == INVALID_SOCKET)	       /* how the hell did we get here?! */	return -5000;    if (WSAGETSELECTERROR(lParam) != 0)	return -WSAGETSELECTERROR(lParam);    switch (WSAGETSELECTEVENT(lParam)) {      case FD_READ:	ret = recv(s, buf, sizeof(buf), 0);	if (ret < 0 && WSAGetLastError() == WSAEWOULDBLOCK)	    return 1;	if (ret < 0)		       /* any _other_ error */	    return -10000-WSAGetLastError();	if (ret == 0) {	    s = INVALID_SOCKET;	    return 0;		       /* can't happen, in theory */	}	ssh_gotdata (buf, ret);	return 1;      case FD_CLOSE:	s = INVALID_SOCKET;        ssh_state = SSH_STATE_CLOSED;	return 0;    }    return 1;			       /* shouldn't happen, but WTF */}