문제

When I connect to 80 port, plain text web site using TIdTCPClient component, all works fine, data is received without a problem, but, when I connect to 443 port, SSL web site, data not always came.

Maybe something with my receive data block ? Need advice.

  while not Terminated do
  begin
    SetLength(data, 0);
    ws.IOHandler.ReadBytes(data, -1);
    if Length(data) = 0 then
      break;

    // processing_my(data);
  end;

Thanks

도움이 되었습니까?

해결책

Opening the connection to an other port to have it secure is not enough. To connect to anything SSL, you'll need an IOHandler that supports it, such as TIdSSLIOHandlerSocketOpenSSL

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top