I want to add: 1) ISAPI must have sync sockets 2) when I go through breakpoints, no -1's are returned and the sample jpg returned by the ISAPI extension works perfectly. (no corruption)
Best Regards, SZ On 11/21/06, Fastream Technologies <[EMAIL PROTECTED]> wrote: > Hello, > > In our ISAPI server, if the request is detected to be of a ISAPI > interpreter one, we run the routine, > > > OldDataAvailable = FOnDataAvailable; > OldSendData = FOnSendData; > OldDataSent = FOnDataSent; > FOnDataAvailable = NULL; > FOnSendData = NULL; > FOnDataSent = NULL; > > int iMode = 0; > WSocket_ioctlsocket(HSocket, FIONBIO, iMode); > iMode = 1; // as suggested by this group sometime ago > > then we in the callback function of ISAPI for writing to socket, we have, > > function TWebConnection.SendSync(Data: PChar; DataLen: Integer): boolean; > var > Count: int64; > begin > if FTerminated or > (State <> wsConnected) then > begin > Result := false; > Exit; > end; > > Count := WSocket_send(HSocket, > TWSocketData(Data), > DataLen, > 0); > > Result := Count > 0; // COUNT IS MOSTLY -1!!!! > > if FTerminated or (Result = false) then > begin > Result := false; > Exit; > end; > > if Result = true then > DataSent := DataSent + Count; > > if FTerminated or > (State <> wsConnected) then > begin > Result := false; > end; > end; > > What could be the reason? Any idea? > > Best Regards, > > SZ > -- 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
