anchor.diff:  
     tv: timeval;
     Timeptr: PTimeval;
  -
  +  valopt,vallen: Cardinal;
   begin
     // ȡԭ־
     lvFlags := fcntl(FSocketHandle, F_GETFL, 0);
  
positive.code: 
    FSockaddr.sin_addr.s_addr :=inet_addr(MarshaledAString(UTF8Encode(pvAddr)));
    lvRet := Posix.SysSocket.Connect(FSocketHandle, sockaddr(FSockaddr), sizeof(sockaddr_in));
  
    if lvRet = 0 then
    begin  // ӳɹ
      lvFlags := lvFlags AND (NOT O_NONBLOCK);  // ģʽ
      fcntl(FSocketHandle, F_SETFL, lvFlags);
      Result := true;
    end else
    begin
      FD_ZERO(fs);
      _FD_SET(FSocketHandle, fs);
  
  
negative.code:       Result := false;  //ӳʱ
  //      lvErr := WSAGetLastError;
        __close(FSocketHandle);
  
  //      Result := lvErr = 0;
      end else
      begin
        // add by []u  83055474
        // 2015-05-11 11:41:48
        getsockopt(FSocketHandle, SOL_SOCKET, SO_ERROR,valopt,  vallen);
        if(valopt>0)then
        begin
          Result := false;
          exit;
        end;
        Result := true;
        lvFlags := lvFlags AND (NOT O_NONBLOCK);  // ģʽ
        fcntl(FSocketHandle, F_SETFL, lvFlags);
      end;
    end;
  
  
  
  end;
  