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