This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Win32 gcj: How to create a shared library and other w32 issues
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: JBoekemeier at inetsoftware dot de
- Cc: java at gcc dot gnu dot org
- Date: Sun, 1 Jun 2003 14:37:17 +1000 (EST)
- Subject: Re: Win32 gcj: How to create a shared library and other w32 issues
Jost Boekemeier wrote:
> Third question: Does anyone know how to ask for the available bytes after
> opening a socket connection? -- gcj says that it is not supported on Win32,
> but somehow I don't believe this. :)
>
Would something like this work?
Danny
#include <winsock2.h>
int inavail_winsock(SOCKET socket)
{
int err;
unsigned long num = 0;
if (ioctlsocket (socket, FIONREAD, &num) == 0)
return num;
err = WSAGetLastError();
/* handle it */
return 0;
}
http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.