WSAEWOULDBLOCK就是说你发出一个连接请求不能立刻执行,而TClientSocket没有处理
这个错误,所以就弹出错误窗口,
function CheckSocketResult(ResultCode: Integer; const Op: string): Integer;
begin
if ResultCode <> 0 then
begin
Result := WSAGetLastError;
// if Result <> WSAEWOULDBLOCK then //去掉这一行,你看看行不行!!!
if Assigned(SocketErrorProc) then
SocketErrorProc(Result)
else raise ESocketError.CreateResFmt(@sWindowsSocketError,
[SysErrorMessage(Result), Result, Op]);
end else Result := 0;
end;