> What could be the reason? Any idea? Cal WSAGetLastError to know the error code. -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be
----- Original Message ----- From: "Fastream Technologies" <[EMAIL PROTECTED]> To: "ICS support mailing" <twsocket@elists.org> Sent: Tuesday, November 21, 2006 1:09 PM Subject: [twsocket] TWSocket sync send problem within ISAPI > 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 -- 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