2007-02-13 00:52:39 +01:00
|
|
|
/* Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
This file is part of libgcj.
|
|
|
|
|
|
|
|
This software is copyrighted work licensed under the terms of the
|
|
|
|
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
|
|
|
details. */
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
#include <platform.h>
|
|
|
|
|
|
|
|
#ifdef HAVE_SYS_IOCTL_H
|
|
|
|
#define BSD_COMP /* Get FIONREAD on Solaris2. */
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Pick up FIONREAD on Solaris 2.5.
|
|
|
|
#ifdef HAVE_SYS_FILIO_H
|
|
|
|
#include <sys/filio.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <netinet/tcp.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#if HAVE_BSTRING_H
|
|
|
|
// Needed for bzero, implicitly used by FD_ZERO on IRIX 5.2
|
|
|
|
#include <bstring.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <gcj/cni.h>
|
|
|
|
#include <gcj/javaprims.h>
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
#include <gnu/java/net/PlainSocketImpl.h>
|
2003-09-24 07:38:36 +02:00
|
|
|
#include <gnu/java/net/PlainSocketImpl$SocketInputStream.h>
|
|
|
|
#include <gnu/java/net/PlainSocketImpl$SocketOutputStream.h>
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
#include <java/io/IOException.h>
|
|
|
|
#include <java/io/InterruptedIOException.h>
|
|
|
|
#include <java/net/BindException.h>
|
|
|
|
#include <java/net/ConnectException.h>
|
|
|
|
#include <java/net/InetAddress.h>
|
|
|
|
#include <java/net/InetSocketAddress.h>
|
|
|
|
#include <java/net/SocketException.h>
|
|
|
|
#include <java/net/SocketTimeoutException.h>
|
|
|
|
#include <java/lang/InternalError.h>
|
|
|
|
#include <java/lang/Object.h>
|
|
|
|
#include <java/lang/Boolean.h>
|
|
|
|
#include <java/lang/Class.h>
|
|
|
|
#include <java/lang/Integer.h>
|
|
|
|
#include <java/lang/Thread.h>
|
|
|
|
#include <java/lang/NullPointerException.h>
|
|
|
|
#include <java/lang/ArrayIndexOutOfBoundsException.h>
|
|
|
|
#include <java/lang/IllegalArgumentException.h>
|
2006-04-20 17:46:40 +02:00
|
|
|
#include <java/net/UnknownHostException.h>
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
union SockAddr
|
|
|
|
{
|
|
|
|
struct sockaddr_in address;
|
|
|
|
#ifdef HAVE_INET6
|
|
|
|
struct sockaddr_in6 address6;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
void
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
gnu::java::net::PlainSocketImpl::create (jboolean stream)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
2007-04-03 00:10:41 +02:00
|
|
|
// We might already have been create()d in the nio case.
|
|
|
|
if (native_fd != -1)
|
|
|
|
return;
|
|
|
|
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
int sock = _Jv_socket (AF_INET, stream ? SOCK_STREAM : SOCK_DGRAM, 0);
|
|
|
|
|
|
|
|
if (sock < 0)
|
|
|
|
{
|
|
|
|
char* strerr = strerror (errno);
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::io::IOException (JvNewStringUTF (strerr));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
2003-10-21 14:29:43 +02:00
|
|
|
// We use native_fd in place of fd here. From leaving fd null we avoid
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
// the double close problem in FileDescriptor.finalize.
|
2003-10-21 14:29:43 +02:00
|
|
|
native_fd = sock;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
gnu::java::net::PlainSocketImpl::bind (::java::net::InetAddress *host, jint lport)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
|
|
|
union SockAddr u;
|
|
|
|
struct sockaddr *ptr = (struct sockaddr *) &u.address;
|
|
|
|
jbyteArray haddress = host->addr;
|
|
|
|
jbyte *bytes = elements (haddress);
|
|
|
|
int len = haddress->length;
|
|
|
|
int i = 1;
|
|
|
|
|
2006-07-22 03:42:25 +02:00
|
|
|
// The following is needed for OS X/PPC, otherwise bind() fails with an
|
|
|
|
// error. I found the issue and following fix on some mailing list, but
|
|
|
|
// no explanation was given as to why this solved the problem.
|
|
|
|
memset (&u, 0, sizeof (u));
|
|
|
|
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
if (len == 4)
|
|
|
|
{
|
|
|
|
u.address.sin_family = AF_INET;
|
2008-02-27 19:53:02 +01:00
|
|
|
memcpy (&u.address.sin_addr, bytes, len);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
len = sizeof (struct sockaddr_in);
|
|
|
|
u.address.sin_port = htons (lport);
|
|
|
|
}
|
|
|
|
#ifdef HAVE_INET6
|
|
|
|
else if (len == 16)
|
|
|
|
{
|
|
|
|
u.address6.sin6_family = AF_INET6;
|
|
|
|
memcpy (&u.address6.sin6_addr, bytes, len);
|
|
|
|
len = sizeof (struct sockaddr_in6);
|
|
|
|
u.address6.sin6_port = htons (lport);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (JvNewStringUTF ("invalid length"));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
// Enable SO_REUSEADDR, so that servers can reuse ports left in TIME_WAIT.
|
2003-10-21 14:29:43 +02:00
|
|
|
::setsockopt(native_fd, SOL_SOCKET, SO_REUSEADDR, (char *) &i, sizeof(i));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
2003-10-21 14:29:43 +02:00
|
|
|
if (_Jv_bind (native_fd, ptr, len) == 0)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
|
|
|
socklen_t addrlen = sizeof(u);
|
|
|
|
|
|
|
|
if (lport != 0)
|
|
|
|
localport = lport;
|
2003-10-21 14:29:43 +02:00
|
|
|
else if (::getsockname (native_fd, (sockaddr*) &u, &addrlen) == 0)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
localport = ntohs (u.address.sin_port);
|
|
|
|
else
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
error:
|
|
|
|
char* strerr = strerror (errno);
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::BindException (JvNewStringUTF (strerr));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
gnu::java::net::PlainSocketImpl::connect (::java::net::SocketAddress *addr,
|
2006-04-20 17:46:40 +02:00
|
|
|
jint timeout)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
::java::net::InetSocketAddress *tmp = (::java::net::InetSocketAddress*) addr;
|
|
|
|
::java::net::InetAddress *host = tmp->getAddress();
|
2006-04-20 17:46:40 +02:00
|
|
|
if (! host)
|
|
|
|
throw new ::java::net::UnknownHostException(tmp->toString());
|
|
|
|
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
jint rport = tmp->getPort();
|
|
|
|
|
2005-12-28 19:29:10 +01:00
|
|
|
// Set the SocketImpl's address and port fields before we try to
|
|
|
|
// connect. Note that the fact that these are set doesn't imply
|
|
|
|
// that we're actually connected to anything. We need to record
|
|
|
|
// this data before we attempt the connect, since non-blocking
|
|
|
|
// SocketChannels will use this and almost certainly throw timeout
|
|
|
|
// exceptions.
|
|
|
|
address = host;
|
|
|
|
port = rport;
|
|
|
|
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
union SockAddr u;
|
|
|
|
socklen_t addrlen = sizeof(u);
|
|
|
|
jbyteArray haddress = host->addr;
|
|
|
|
jbyte *bytes = elements (haddress);
|
|
|
|
int len = haddress->length;
|
|
|
|
struct sockaddr *ptr = (struct sockaddr *) &u.address;
|
|
|
|
if (len == 4)
|
|
|
|
{
|
|
|
|
u.address.sin_family = AF_INET;
|
|
|
|
memcpy (&u.address.sin_addr, bytes, len);
|
|
|
|
len = sizeof (struct sockaddr_in);
|
|
|
|
u.address.sin_port = htons (rport);
|
|
|
|
}
|
|
|
|
#ifdef HAVE_INET6
|
|
|
|
else if (len == 16)
|
|
|
|
{
|
|
|
|
u.address6.sin6_family = AF_INET6;
|
|
|
|
memcpy (&u.address6.sin6_addr, bytes, len);
|
|
|
|
len = sizeof (struct sockaddr_in6);
|
|
|
|
u.address6.sin6_port = htons (rport);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (JvNewStringUTF ("invalid length"));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
if (timeout > 0)
|
|
|
|
{
|
2003-10-21 14:29:43 +02:00
|
|
|
int flags = ::fcntl (native_fd, F_GETFL);
|
|
|
|
::fcntl (native_fd, F_SETFL, flags | O_NONBLOCK);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
2003-10-21 14:29:43 +02:00
|
|
|
if ((_Jv_connect (native_fd, ptr, len) != 0) && (errno != EINPROGRESS))
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
goto error;
|
|
|
|
|
2003-08-07 03:13:46 +02:00
|
|
|
fd_set fset;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
struct timeval tv;
|
2003-08-07 03:13:46 +02:00
|
|
|
FD_ZERO(&fset);
|
2003-10-21 14:29:43 +02:00
|
|
|
FD_SET(native_fd, &fset);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
tv.tv_sec = timeout / 1000;
|
|
|
|
tv.tv_usec = (timeout % 1000) * 1000;
|
|
|
|
int retval;
|
|
|
|
|
2003-10-21 14:29:43 +02:00
|
|
|
if ((retval = _Jv_select (native_fd + 1, &fset, &fset, NULL, &tv)) < 0)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
goto error;
|
|
|
|
else if (retval == 0)
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketTimeoutException
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
(JvNewStringUTF ("Connect timed out"));
|
2003-08-07 03:13:46 +02:00
|
|
|
// Set the socket back into a blocking state.
|
2003-10-21 14:29:43 +02:00
|
|
|
::fcntl (native_fd, F_SETFL, flags);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-10-21 14:29:43 +02:00
|
|
|
if (_Jv_connect (native_fd, ptr, len) != 0)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
|
|
|
// A bind may not have been done on this socket; if so, set localport now.
|
|
|
|
if (localport == 0)
|
|
|
|
{
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::getsockname (native_fd, (sockaddr*) &u, &addrlen) == 0)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
localport = ntohs (u.address.sin_port);
|
|
|
|
else
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
error:
|
|
|
|
char* strerr = strerror (errno);
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::ConnectException (JvNewStringUTF (strerr));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
gnu::java::net::PlainSocketImpl::listen (jint backlog)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::listen (native_fd, backlog) != 0)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
|
|
|
char* strerr = strerror (errno);
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::io::IOException (JvNewStringUTF (strerr));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-11-15 20:11:53 +01:00
|
|
|
static void
|
|
|
|
throw_on_sock_closed (gnu::java::net::PlainSocketImpl *soc_impl)
|
|
|
|
{
|
|
|
|
// Avoid races from asynchronous close().
|
|
|
|
JvSynchronize sync (soc_impl);
|
|
|
|
if (soc_impl->native_fd == -1)
|
|
|
|
{
|
|
|
|
using namespace java::net;
|
|
|
|
// Socket was closed.
|
|
|
|
SocketException *se =
|
|
|
|
new SocketException (JvNewStringUTF ("Socket Closed"));
|
|
|
|
throw se;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
void
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
gnu::java::net::PlainSocketImpl::accept (gnu::java::net::PlainSocketImpl *s)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
|
|
|
union SockAddr u;
|
|
|
|
socklen_t addrlen = sizeof(u);
|
|
|
|
int new_socket = 0;
|
|
|
|
|
|
|
|
// Do timeouts via select since SO_RCVTIMEO is not always available.
|
2003-10-21 14:29:43 +02:00
|
|
|
if (timeout > 0 && native_fd >= 0 && native_fd < FD_SETSIZE)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
2003-08-07 03:13:46 +02:00
|
|
|
fd_set fset;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
struct timeval tv;
|
2003-08-07 03:13:46 +02:00
|
|
|
FD_ZERO(&fset);
|
2003-10-21 14:29:43 +02:00
|
|
|
FD_SET(native_fd, &fset);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
tv.tv_sec = timeout / 1000;
|
|
|
|
tv.tv_usec = (timeout % 1000) * 1000;
|
|
|
|
int retval;
|
2003-10-21 14:29:43 +02:00
|
|
|
if ((retval = _Jv_select (native_fd + 1, &fset, &fset, NULL, &tv)) < 0)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
goto error;
|
|
|
|
else if (retval == 0)
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketTimeoutException (
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
JvNewStringUTF("Accept timed out"));
|
|
|
|
}
|
|
|
|
|
2003-10-21 14:29:43 +02:00
|
|
|
new_socket = _Jv_accept (native_fd, (sockaddr*) &u, &addrlen);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
if (new_socket < 0)
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
jbyteArray raddr;
|
|
|
|
jint rport;
|
|
|
|
if (u.address.sin_family == AF_INET)
|
|
|
|
{
|
|
|
|
raddr = JvNewByteArray (4);
|
|
|
|
memcpy (elements (raddr), &u.address.sin_addr, 4);
|
|
|
|
rport = ntohs (u.address.sin_port);
|
|
|
|
}
|
|
|
|
#ifdef HAVE_INET6
|
|
|
|
else if (u.address.sin_family == AF_INET6)
|
|
|
|
{
|
|
|
|
raddr = JvNewByteArray (16);
|
|
|
|
memcpy (elements (raddr), &u.address6.sin6_addr, 16);
|
|
|
|
rport = ntohs (u.address6.sin6_port);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (JvNewStringUTF ("invalid family"));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
2003-10-21 14:29:43 +02:00
|
|
|
s->native_fd = new_socket;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
s->localport = localport;
|
2006-09-20 09:55:26 +02:00
|
|
|
s->address = ::java::net::InetAddress::getByAddress (raddr);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
s->port = rport;
|
|
|
|
return;
|
|
|
|
|
|
|
|
error:
|
|
|
|
char* strerr = strerror (errno);
|
2005-11-15 20:11:53 +01:00
|
|
|
throw_on_sock_closed (this);
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::io::IOException (JvNewStringUTF (strerr));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Close(shutdown) the socket.
|
|
|
|
void
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
gnu::java::net::PlainSocketImpl::close()
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
|
|
|
// Avoid races from asynchronous finalization.
|
|
|
|
JvSynchronize sync (this);
|
|
|
|
|
2005-11-15 20:11:53 +01:00
|
|
|
// Should we use shutdown here? Yes.
|
|
|
|
// How would that effect so_linger? Uncertain.
|
|
|
|
::shutdown (native_fd, 2);
|
|
|
|
// Ignore errors in shutdown as we are closing and all the same
|
|
|
|
// errors are handled in the close.
|
2003-10-21 14:29:43 +02:00
|
|
|
int res = _Jv_close (native_fd);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
if (res == -1)
|
|
|
|
{
|
|
|
|
// These three errors are not errors according to tests performed
|
|
|
|
// on the reference implementation.
|
|
|
|
if (errno != ENOTCONN && errno != ECONNRESET && errno != EBADF)
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::io::IOException (JvNewStringUTF (strerror (errno)));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
// Safe place to reset the file pointer.
|
2003-10-21 14:29:43 +02:00
|
|
|
native_fd = -1;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
timeout = 0;
|
|
|
|
}
|
|
|
|
|
2004-03-17 09:09:32 +01:00
|
|
|
static void
|
|
|
|
write_helper (jint native_fd, jbyte *bytes, jint len);
|
|
|
|
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
// Write a byte to the socket.
|
|
|
|
void
|
2003-09-24 07:38:36 +02:00
|
|
|
gnu::java::net::PlainSocketImpl$SocketOutputStream::write(jint b)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
2004-03-17 09:09:32 +01:00
|
|
|
jbyte data = (jbyte) b;
|
|
|
|
write_helper (this$0->native_fd, &data, 1);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Write some bytes to the socket.
|
|
|
|
void
|
2003-09-24 07:38:36 +02:00
|
|
|
gnu::java::net::PlainSocketImpl$SocketOutputStream::write(jbyteArray b, jint offset, jint len)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
|
|
|
if (! b)
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::lang::NullPointerException;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
if (offset < 0 || len < 0 || offset + len > JvGetArrayLength (b))
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::lang::ArrayIndexOutOfBoundsException;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
2007-02-13 00:52:39 +01:00
|
|
|
write_helper (this$0->native_fd, elements (b) + offset, len);
|
2004-03-17 09:09:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
write_helper(jint native_fd, jbyte *bytes, jint len)
|
|
|
|
{
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
int written = 0;
|
|
|
|
|
|
|
|
while (len > 0)
|
|
|
|
{
|
2004-03-17 09:09:32 +01:00
|
|
|
int r = _Jv_write (native_fd, bytes, len);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
if (r == -1)
|
|
|
|
{
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
if (::java::lang::Thread::interrupted())
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
::java::io::InterruptedIOException *iioe
|
|
|
|
= new ::java::io::InterruptedIOException
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
(JvNewStringLatin1 (strerror (errno)));
|
|
|
|
iioe->bytesTransferred = written;
|
|
|
|
throw iioe;
|
|
|
|
}
|
|
|
|
// Some errors should not cause exceptions.
|
|
|
|
if (errno != ENOTCONN && errno != ECONNRESET && errno != EBADF)
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::io::IOException (JvNewStringUTF (strerror (errno)));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
written += r;
|
|
|
|
len -= r;
|
|
|
|
bytes += r;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
gnu::java::net::PlainSocketImpl::sendUrgentData (jint)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (JvNewStringLatin1 (
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
"PlainSocketImpl: sending of urgent data not supported by this socket"));
|
|
|
|
}
|
|
|
|
|
2004-03-17 09:09:32 +01:00
|
|
|
static jint
|
2005-11-15 20:11:53 +01:00
|
|
|
read_helper (gnu::java::net::PlainSocketImpl *soc_impl,
|
|
|
|
jbyte *bytes, jint count);
|
2004-03-17 09:09:32 +01:00
|
|
|
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
// Read a single byte from the socket.
|
|
|
|
jint
|
2003-09-24 07:38:36 +02:00
|
|
|
gnu::java::net::PlainSocketImpl$SocketInputStream::read(void)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
2004-03-17 09:09:32 +01:00
|
|
|
jbyte data;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
2005-11-15 20:11:53 +01:00
|
|
|
if (read_helper (this$0, &data, 1) == 1)
|
2004-05-11 21:48:45 +02:00
|
|
|
return data & 0xFF;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
2004-03-17 09:09:32 +01:00
|
|
|
return -1;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Read count bytes into the buffer, starting at offset.
|
|
|
|
jint
|
2005-11-15 20:11:53 +01:00
|
|
|
gnu::java::net::PlainSocketImpl$SocketInputStream::read(jbyteArray buffer,
|
|
|
|
jint offset,
|
|
|
|
jint count)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
2004-03-17 09:09:32 +01:00
|
|
|
if (! buffer)
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::lang::NullPointerException;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
jsize bsize = JvGetArrayLength (buffer);
|
|
|
|
|
|
|
|
if (offset < 0 || count < 0 || offset + count > bsize)
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::lang::ArrayIndexOutOfBoundsException;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
2007-02-13 00:52:39 +01:00
|
|
|
return read_helper (this$0, elements (buffer) + offset, count);
|
2004-03-17 09:09:32 +01:00
|
|
|
}
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
2004-03-17 09:09:32 +01:00
|
|
|
static jint
|
2005-11-15 20:11:53 +01:00
|
|
|
read_helper (gnu::java::net::PlainSocketImpl *soc_impl,
|
|
|
|
jbyte *bytes, jint count)
|
2004-03-17 09:09:32 +01:00
|
|
|
{
|
2005-03-15 17:46:51 +01:00
|
|
|
// If zero bytes were requested, short circuit so that recv
|
|
|
|
// doesn't signal EOF.
|
|
|
|
if (count == 0)
|
|
|
|
return 0;
|
|
|
|
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
// Do timeouts via select.
|
2005-11-15 20:11:53 +01:00
|
|
|
if (soc_impl->timeout > 0
|
|
|
|
&& soc_impl->native_fd >= 0
|
|
|
|
&& soc_impl->native_fd < FD_SETSIZE)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
|
|
|
// Create the file descriptor set.
|
|
|
|
fd_set read_fds;
|
|
|
|
FD_ZERO (&read_fds);
|
2005-11-15 20:11:53 +01:00
|
|
|
FD_SET (soc_impl->native_fd, &read_fds);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
// Create the timeout struct based on our internal timeout value.
|
|
|
|
struct timeval timeout_value;
|
2005-11-15 20:11:53 +01:00
|
|
|
timeout_value.tv_sec = soc_impl->timeout / 1000;
|
|
|
|
timeout_value.tv_usec =(soc_impl->timeout % 1000) * 1000;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
// Select on the fds.
|
|
|
|
int sel_retval =
|
2005-11-15 20:11:53 +01:00
|
|
|
_Jv_select (soc_impl->native_fd + 1,
|
|
|
|
&read_fds, NULL, NULL, &timeout_value);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
// We're only interested in the 0 return.
|
|
|
|
// error returns still require us to try to read
|
|
|
|
// the socket to see what happened.
|
|
|
|
if (sel_retval == 0)
|
|
|
|
{
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
::java::net::SocketTimeoutException *timeoutException =
|
|
|
|
new ::java::net::SocketTimeoutException
|
2003-12-16 23:47:53 +01:00
|
|
|
(JvNewStringUTF ("Read timed out"));
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw timeoutException;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Read the socket.
|
2005-11-15 20:11:53 +01:00
|
|
|
int r = ::recv (soc_impl->native_fd, (char *) bytes, count, 0);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
if (r == 0)
|
2005-11-15 20:11:53 +01:00
|
|
|
{
|
|
|
|
throw_on_sock_closed (soc_impl);
|
|
|
|
return -1;
|
|
|
|
}
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
if (::java::lang::Thread::interrupted())
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
::java::io::InterruptedIOException *iioe =
|
|
|
|
new ::java::io::InterruptedIOException
|
2003-12-16 23:47:53 +01:00
|
|
|
(JvNewStringUTF ("Read interrupted"));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
iioe->bytesTransferred = r == -1 ? 0 : r;
|
|
|
|
throw iioe;
|
|
|
|
}
|
|
|
|
else if (r == -1)
|
|
|
|
{
|
2005-11-15 20:11:53 +01:00
|
|
|
throw_on_sock_closed (soc_impl);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
// Some errors cause us to return end of stream...
|
|
|
|
if (errno == ENOTCONN)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
// Other errors need to be signalled.
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::io::IOException (JvNewStringUTF (strerror (errno)));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
// How many bytes are available?
|
|
|
|
jint
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
gnu::java::net::PlainSocketImpl::available(void)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
|
|
|
#if defined(FIONREAD) || defined(HAVE_SELECT)
|
2004-10-22 17:27:04 +02:00
|
|
|
int num = 0;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
int r = 0;
|
|
|
|
bool num_set = false;
|
|
|
|
|
|
|
|
#if defined(FIONREAD)
|
2003-10-21 14:29:43 +02:00
|
|
|
r = ::ioctl (native_fd, FIONREAD, &num);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
if (r == -1 && errno == ENOTTY)
|
|
|
|
{
|
|
|
|
// If the ioctl doesn't work, we don't care.
|
|
|
|
r = 0;
|
|
|
|
num = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
num_set = true;
|
|
|
|
#elif defined(HAVE_SELECT)
|
2003-10-21 14:29:43 +02:00
|
|
|
if (native_fd < 0)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
|
|
|
errno = EBADF;
|
|
|
|
r = -1;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (r == -1)
|
|
|
|
{
|
|
|
|
posix_error:
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::io::IOException(JvNewStringUTF(strerror(errno)));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// If we didn't get anything we can use select.
|
|
|
|
|
|
|
|
#if defined(HAVE_SELECT)
|
|
|
|
if (! num_set)
|
2003-10-21 14:29:43 +02:00
|
|
|
if (! num_set && native_fd >= 0 && native_fd < FD_SETSIZE)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
|
|
|
fd_set rd;
|
|
|
|
FD_ZERO (&rd);
|
2003-10-21 14:29:43 +02:00
|
|
|
FD_SET (native_fd, &rd);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
struct timeval tv;
|
|
|
|
tv.tv_sec = 0;
|
|
|
|
tv.tv_usec = 0;
|
2003-10-21 14:29:43 +02:00
|
|
|
r = _Jv_select (native_fd + 1, &rd, NULL, NULL, &tv);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
if(r == -1)
|
|
|
|
goto posix_error;
|
|
|
|
num = r == 0 ? 0 : 1;
|
|
|
|
}
|
|
|
|
#endif /* HAVE_SELECT */
|
|
|
|
|
|
|
|
return (jint) num;
|
|
|
|
#else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::io::IOException (JvNewStringUTF ("unimplemented"));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
gnu::java::net::PlainSocketImpl::setOption (jint optID, ::java::lang::Object *value)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
|
|
|
int val;
|
|
|
|
socklen_t val_len = sizeof (val);
|
|
|
|
|
2003-10-21 14:29:43 +02:00
|
|
|
if (native_fd < 0)
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (JvNewStringUTF ("Socket closed"));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
if (_Jv_IsInstanceOf (value, &::java::lang::Boolean::class$))
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
::java::lang::Boolean *boolobj =
|
|
|
|
static_cast< ::java::lang::Boolean *> (value);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
if (boolobj->booleanValue())
|
|
|
|
val = 1;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (optID == _Jv_SO_LINGER_)
|
|
|
|
val = -1;
|
|
|
|
else
|
|
|
|
val = 0;
|
|
|
|
}
|
|
|
|
}
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
else if (_Jv_IsInstanceOf (value, &::java::lang::Integer::class$))
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
::java::lang::Integer *intobj =
|
|
|
|
static_cast< ::java::lang::Integer *> (value);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
val = (int) intobj->intValue();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::lang::IllegalArgumentException (
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
JvNewStringLatin1 ("`value' must be Boolean or Integer"));
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (optID)
|
|
|
|
{
|
|
|
|
case _Jv_TCP_NODELAY_ :
|
|
|
|
#ifdef TCP_NODELAY
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::setsockopt (native_fd, IPPROTO_TCP, TCP_NODELAY, (char *) &val,
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
val_len) != 0)
|
|
|
|
goto error;
|
|
|
|
#else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::lang::InternalError
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
(JvNewStringUTF ("TCP_NODELAY not supported"));
|
|
|
|
#endif /* TCP_NODELAY */
|
|
|
|
return;
|
|
|
|
|
|
|
|
case _Jv_SO_KEEPALIVE_ :
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::setsockopt (native_fd, SOL_SOCKET, SO_KEEPALIVE, (char *) &val,
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
val_len) != 0)
|
|
|
|
goto error;
|
2003-10-29 11:33:57 +01:00
|
|
|
return;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
case _Jv_SO_BROADCAST_ :
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
(JvNewStringUTF ("SO_BROADCAST not valid for TCP"));
|
2003-10-29 11:33:57 +01:00
|
|
|
return;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
case _Jv_SO_OOBINLINE_ :
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::setsockopt (native_fd, SOL_SOCKET, SO_OOBINLINE, (char *) &val,
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
val_len) != 0)
|
|
|
|
goto error;
|
2003-10-29 11:33:57 +01:00
|
|
|
return;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
case _Jv_SO_LINGER_ :
|
|
|
|
#ifdef SO_LINGER
|
|
|
|
struct linger l_val;
|
|
|
|
l_val.l_onoff = (val != -1);
|
|
|
|
l_val.l_linger = val;
|
|
|
|
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::setsockopt (native_fd, SOL_SOCKET, SO_LINGER, (char *) &l_val,
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
sizeof(l_val)) != 0)
|
|
|
|
goto error;
|
|
|
|
#else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::lang::InternalError (
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
JvNewStringUTF ("SO_LINGER not supported"));
|
|
|
|
#endif /* SO_LINGER */
|
|
|
|
return;
|
|
|
|
|
|
|
|
case _Jv_SO_SNDBUF_ :
|
|
|
|
case _Jv_SO_RCVBUF_ :
|
|
|
|
#if defined(SO_SNDBUF) && defined(SO_RCVBUF)
|
|
|
|
int opt;
|
|
|
|
optID == _Jv_SO_SNDBUF_ ? opt = SO_SNDBUF : opt = SO_RCVBUF;
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::setsockopt (native_fd, SOL_SOCKET, opt, (char *) &val, val_len) != 0)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
goto error;
|
|
|
|
#else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::lang::InternalError (
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
JvNewStringUTF ("SO_RCVBUF/SO_SNDBUF not supported"));
|
|
|
|
#endif
|
|
|
|
return;
|
|
|
|
|
|
|
|
case _Jv_SO_BINDADDR_ :
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
JvNewStringUTF ("SO_BINDADDR: read only option"));
|
|
|
|
return;
|
|
|
|
|
|
|
|
case _Jv_IP_MULTICAST_IF_ :
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
JvNewStringUTF ("IP_MULTICAST_IF: not valid for TCP"));
|
|
|
|
return;
|
|
|
|
|
|
|
|
case _Jv_IP_MULTICAST_IF2_ :
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
JvNewStringUTF ("IP_MULTICAST_IF2: not valid for TCP"));
|
2003-10-29 11:33:57 +01:00
|
|
|
return;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
case _Jv_IP_MULTICAST_LOOP_ :
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
JvNewStringUTF ("IP_MULTICAST_LOOP: not valid for TCP"));
|
2003-10-29 11:33:57 +01:00
|
|
|
return;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
case _Jv_IP_TOS_ :
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::setsockopt (native_fd, SOL_SOCKET, IP_TOS, (char *) &val,
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
val_len) != 0)
|
|
|
|
goto error;
|
2003-10-29 11:33:57 +01:00
|
|
|
return;
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
case _Jv_SO_REUSEADDR_ :
|
2005-02-01 20:22:47 +01:00
|
|
|
#if defined(SO_REUSEADDR)
|
|
|
|
if (::setsockopt (native_fd, SOL_SOCKET, SO_REUSEADDR, (char *) &val,
|
|
|
|
val_len) != 0)
|
|
|
|
goto error;
|
2005-06-06 08:17:28 +02:00
|
|
|
return;
|
2005-02-01 20:22:47 +01:00
|
|
|
#else
|
|
|
|
throw new ::java::lang::InternalError (
|
|
|
|
JvNewStringUTF ("SO_REUSEADDR not supported"));
|
|
|
|
#endif
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
case _Jv_SO_TIMEOUT_ :
|
|
|
|
timeout = val;
|
|
|
|
return;
|
|
|
|
|
|
|
|
default :
|
|
|
|
errno = ENOPROTOOPT;
|
|
|
|
}
|
|
|
|
|
|
|
|
error:
|
|
|
|
char* strerr = strerror (errno);
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (JvNewStringUTF (strerr));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
::java::lang::Object *
|
|
|
|
gnu::java::net::PlainSocketImpl::getOption (jint optID)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
|
|
|
int val;
|
|
|
|
socklen_t val_len = sizeof(val);
|
|
|
|
union SockAddr u;
|
|
|
|
socklen_t addrlen = sizeof(u);
|
|
|
|
struct linger l_val;
|
|
|
|
socklen_t l_val_len = sizeof(l_val);
|
|
|
|
|
|
|
|
switch (optID)
|
|
|
|
{
|
|
|
|
#ifdef TCP_NODELAY
|
|
|
|
case _Jv_TCP_NODELAY_ :
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::getsockopt (native_fd, IPPROTO_TCP, TCP_NODELAY, (char *) &val,
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
&val_len) != 0)
|
|
|
|
goto error;
|
|
|
|
else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
return new ::java::lang::Boolean (val != 0);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
#else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::lang::InternalError
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
(JvNewStringUTF ("TCP_NODELAY not supported"));
|
|
|
|
#endif
|
|
|
|
break;
|
|
|
|
|
|
|
|
case _Jv_SO_LINGER_ :
|
|
|
|
#ifdef SO_LINGER
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::getsockopt (native_fd, SOL_SOCKET, SO_LINGER, (char *) &l_val,
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
&l_val_len) != 0)
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
if (l_val.l_onoff)
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
return new ::java::lang::Integer (l_val.l_linger);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
return new ::java::lang::Boolean ((jboolean)false);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
#else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::lang::InternalError
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
(JvNewStringUTF ("SO_LINGER not supported"));
|
|
|
|
#endif
|
|
|
|
break;
|
|
|
|
|
|
|
|
case _Jv_SO_KEEPALIVE_ :
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::getsockopt (native_fd, SOL_SOCKET, SO_KEEPALIVE, (char *) &val,
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
&val_len) != 0)
|
|
|
|
goto error;
|
|
|
|
else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
return new ::java::lang::Boolean (val != 0);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
case _Jv_SO_BROADCAST_ :
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::getsockopt (native_fd, SOL_SOCKET, SO_BROADCAST, (char *) &val,
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
&val_len) != 0)
|
|
|
|
goto error;
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
return new ::java::lang::Boolean ((jboolean)val);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
case _Jv_SO_OOBINLINE_ :
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::getsockopt (native_fd, SOL_SOCKET, SO_OOBINLINE, (char *) &val,
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
&val_len) != 0)
|
|
|
|
goto error;
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
return new ::java::lang::Boolean ((jboolean)val);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
|
|
|
|
case _Jv_SO_RCVBUF_ :
|
|
|
|
case _Jv_SO_SNDBUF_ :
|
|
|
|
#if defined(SO_SNDBUF) && defined(SO_RCVBUF)
|
|
|
|
int opt;
|
|
|
|
optID == _Jv_SO_SNDBUF_ ? opt = SO_SNDBUF : opt = SO_RCVBUF;
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::getsockopt (native_fd, SOL_SOCKET, opt, (char *) &val, &val_len) != 0)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
goto error;
|
|
|
|
else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
return new ::java::lang::Integer (val);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
#else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::lang::InternalError
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
(JvNewStringUTF ("SO_RCVBUF/SO_SNDBUF not supported"));
|
|
|
|
#endif
|
|
|
|
break;
|
|
|
|
case _Jv_SO_BINDADDR_:
|
|
|
|
// cache the local address
|
|
|
|
if (localAddress == NULL)
|
|
|
|
{
|
|
|
|
jbyteArray laddr;
|
|
|
|
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::getsockname (native_fd, (sockaddr*) &u, &addrlen) != 0)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
if (u.address.sin_family == AF_INET)
|
|
|
|
{
|
|
|
|
laddr = JvNewByteArray (4);
|
|
|
|
memcpy (elements (laddr), &u.address.sin_addr, 4);
|
|
|
|
}
|
|
|
|
#ifdef HAVE_INET6
|
|
|
|
else if (u.address.sin_family == AF_INET6)
|
|
|
|
{
|
|
|
|
laddr = JvNewByteArray (16);
|
|
|
|
memcpy (elements (laddr), &u.address6.sin6_addr, 16);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
else
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
(JvNewStringUTF ("invalid family"));
|
2006-09-20 09:55:26 +02:00
|
|
|
localAddress = ::java::net::InetAddress::getByAddress (laddr);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return localAddress;
|
|
|
|
break;
|
|
|
|
case _Jv_IP_MULTICAST_IF_ :
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
(JvNewStringUTF ("IP_MULTICAST_IF: not valid for TCP"));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case _Jv_IP_MULTICAST_IF2_ :
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
(JvNewStringUTF ("IP_MULTICAST_IF2: not valid for TCP"));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case _Jv_IP_MULTICAST_LOOP_ :
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
(JvNewStringUTF ("IP_MULTICAST_LOOP: not valid for TCP"));
|
|
|
|
break;
|
|
|
|
|
|
|
|
case _Jv_IP_TOS_ :
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::getsockopt (native_fd, SOL_SOCKET, IP_TOS, (char *) &val,
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
&val_len) != 0)
|
|
|
|
goto error;
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
return new ::java::lang::Integer (val);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case _Jv_SO_REUSEADDR_ :
|
2005-02-01 20:22:47 +01:00
|
|
|
#if defined(SO_REUSEADDR)
|
|
|
|
if (::getsockopt (native_fd, SOL_SOCKET, SO_REUSEADDR, (char *) &val,
|
|
|
|
&val_len) != 0)
|
|
|
|
goto error;
|
|
|
|
#else
|
|
|
|
throw new ::java::lang::InternalError (
|
|
|
|
JvNewStringUTF ("SO_REUSEADDR not supported"));
|
|
|
|
#endif
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
case _Jv_SO_TIMEOUT_ :
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
return new ::java::lang::Integer (timeout);
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
break;
|
|
|
|
|
|
|
|
default :
|
|
|
|
errno = ENOPROTOOPT;
|
|
|
|
}
|
|
|
|
|
|
|
|
error:
|
|
|
|
char* strerr = strerror (errno);
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (JvNewStringUTF (strerr));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
gnu::java::net::PlainSocketImpl::shutdownInput (void)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::shutdown (native_fd, 0))
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (JvNewStringUTF (strerror (errno)));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
gnu::java::net::PlainSocketImpl::shutdownOutput (void)
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
{
|
2003-10-21 14:29:43 +02:00
|
|
|
if (::shutdown (native_fd, 1))
|
DatagramSocket.java, [...]: Use gnu.java.net.Plain*SocketImpl instead of java.net.PlainSocketImpl.
2003-09-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/ServerSocket.java,
java/net/Socket.java:
Use gnu.java.net.Plain*SocketImpl instead of
java.net.PlainSocketImpl.
* java/net/PlainDatagramSocketImpl.java,
java/net/PlainSocketImpl.java,
java/net/SocketInputStream.java,
java/net/SocketOutputStream.java,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc:
Removed.
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/SocketInputStream.java,
gnu/java/net/SocketOutputStream.java,
gnu/java/net/natPlainDatagramSocketImplNoNet.cc,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplNoNet.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
New files (moved from java/net).
* configure.in: Create links for gnu/java/net/natPlain*SocketImpl.cc
instead of java/net/natPlain*SocketImpl.cc.
* configure: Regenerated.
* Makefile.am: Moved files from java/net to gnu/java/net.
* Makefile.in: Regenerated.
From-SVN: r71274
2003-09-10 19:39:20 +02:00
|
|
|
throw new ::java::net::SocketException (JvNewStringUTF (strerror (errno)));
|
configure.in: Create links to architecture dependent files...
2003-03-18 Michael Koch <konqueror@gmx.de>
* configure.in: Create links to architecture dependent files,
introduced PLATFORMNET variable (set to NoNet for newlib usage).
* configure: Regenerated.
* java/net/natInetAddressNoNet.cc,
java/net/natInetAddressPosix.cc,
java/net/natInetAddressWin32.cc,
java/net/natNetworkInterfaceNoNet.cc,
java/net/natNetworkInterfacePosix.cc,
java/net/natNetworkInterfaceWin32.cc,
java/net/natPlainDatagramSocketImplNoNet.cc,
java/net/natPlainDatagramSocketImplPosix.cc,
java/net/natPlainDatagramSocketImplWin32.cc,
java/net/natPlainSocketImplNoNet.cc,
java/net/natPlainSocketImplPosix.cc,
java/net/natPlainSocketImplWin32.cc: New files.
From-SVN: r64526
2003-03-18 07:01:16 +01:00
|
|
|
}
|