Hello and thanks for your replies, I now have the following code that do not raise any exception:
In the connection class derived from TWebConnection: Pause(); int iMode = 0; WSocket_ioctlsocket(HSocket, FIONBIO, iMode); if(!serverThread->DXISAPI->Execute(this, ISAPIInterpreter, Method, Params, Path, LastFilePath, RequestContentType, POSTString, postedDataLen, scriptResult)) result = dpError; else { iMode = 1; if(WSocket_ioctlsocket(HSocket, FIONBIO, iMode)) { Resume(); Close(); } else Resume(); } and in the TWebConnection that is derived from THttpConnection and can be called from pascal DXISAPI code by callback functions: OldDataAvailable := FOnDataAvailable; OldSendData := FOnSendData; OldDataSent := FOnDataSent; FOnDataAvailable := nil; FOnSendData := nil; FOnDataSent := nil; if FTerminated or ((State <> wsConnected) and (State <> wsSocksConnected)) then begin Result := false; Exit; end; Count := WSocket_send(HSocket, Data, DataLen, 0); Result := Count > 0; if Result = true then DataSent := DataSent + Count; if FTerminated or ((State <> wsConnected) and (State <> wsSocksConnected)) then begin Result := false; end; if Result = true then begin FOnDataAvailable := OldDataAvailable; FOnSendData := OldSendData; FOnDataSent := OldDataSent; end; I still get garbage data with NO HTTP header. Any idea why? Best Regards, SubZ ----- Original Message ----- From: "Francois Piette" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Monday, October 10, 2005 2:24 PM Subject: Re: [twsocket] Fw: Sync THttpConnection derivative >> >> WSocket_ioctlsocket(HSocket, ???, lCount); // What should be >> >> the >> >> parameters here? > > If you want the number of byte available for reading: FIONREAD. > If you want to put the socket in blocking mode: FIONBIO > > You can find those values by looking in MSDN for the ioctlsocket > description. > > -- > Contribute to the SSL Effort. Visit > http://www.overbyte.be/eng/ssl.html > -- > [EMAIL PROTECTED] > Author of ICS (Internet Component Suite, freeware) > Author of MidWare (Multi-tier framework, freeware) > http://www.overbyte.be > > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be