> I still get garbage data with NO HTTP header. > Any idea why? No idea why. But did you use the debugger to verify that Data and DataLen have correct values ?
To debug further, you can add an Windows.OutputDebugString in WSocket_Synchronized_send function to display what is really sent by the component, no matter if called "normally" by the component or by a direct call to WSocket_Send. To see messages printed out by OutputDebugString, you simply hit CTRL+ALT+V within Delphi (Probably the same with BCB). -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be ----- Original Message ----- From: "Fastream Technologies" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Monday, October 10, 2005 4:45 PM Subject: Re: [twsocket] Fw: Sync THttpConnection derivative > 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 -- 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