Przemyslaw,
I'd like to add this code to hbinet.c
HB_FUNC( HB_INETSHUTDOWN )
{
PHB_SOCKET_STRUCT socket = HB_PARSOCKET( 1 );
if( socket )
{
if( socket->sd != HB_NO_SOCKET )
{
hb_retni( hb_socketShutdown( socket->sd, HB_SOCKET_SHUT_RDWR ) );
#if 0
#ifdef HB_INET_LINUX_INTERRUPT
kill( 0, HB_INET_LINUX_INTERRUPT );
#endif
#endif
}
else
hb_retni( -1 );
}
else
hb_inetErrRT();
}
to be able to shutdown a socket before closing it, I've commented out #ifdef
HB_INET_LINUX_INTERRUPT which I don't know what it really does.
Do you think it's ok to commit it like this?
And, by the way, after this call, a call to hb_InetClose() would shutdown
socket again, which I don't think would create problems, but I don't have a
full vision of sockets in all supported platforms.
Maurilio.
--
__________
| | | |__| Maurilio Longo
|_|_|_|____| farmaconsult s.r.l.
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour