Dear Otto,
I have searched for hb_socketIsOpen() in all Harbour sources and it is not found. Maybe it was proposed by the AI ?
Harbour's hb_socketSend() is defined in src/rtl/hbsocket.c and hbsockhb.c ( high level HB_FUNC( HB_SOCKETSEND ) )
Code: Select all | Expand
long hb_socketSend( HB_SOCKET sd, const void * data, long len, int flags, HB_MAXINT timeout )
{
long lSent = 0;
hb_vmUnlock();
if( timeout >= 0 )
{
lSent = hb_socketSelectWR( sd, timeout );
if( lSent == 0 )
{
hb_socketSetError( HB_SOCKET_ERR_TIMEOUT );
lSent = -1;
}
}
if( lSent >= 0 )
{
int iError;
flags = hb_socketTransFlags( flags );
/* in POSIX systems writing data to broken connection stream causes
* that system generates SIGPIPE which has to be caught by application
* otherwise the default action for SIGPIPE is application termination.
* we do not want to generate it so we are setting MSG_NOSIGNAL flag.
*/
#if defined( MSG_NOSIGNAL )
flags |= MSG_NOSIGNAL;
#endif
do
{
lSent = send( sd, ( const char * ) data, len, flags );
iError = lSent > 0 ? 0 : HB_SOCK_GETERROR();
hb_socketSetOsError( iError );
}
while( lSent == -1 && HB_SOCK_IS_EINTR( iError ) &&
hb_vmRequestQuery() == 0 );
}
hb_vmLock();
return lSent;
}
If you try to build wsserver.prg using hb_socketSend() it should be found, but hb_socketIsOpen() will be missing.
I am not sure if you meant that or I may have not properly understood you