2002-09-21 Michael Koch <konqueror@gmx.de>

* java/net/Socket.java
	(sendUrgentData): New method.
	(getChannel): New method.
	* java/net/ServerSocket.java
	(getChannel): New method.
	(isBound): New method.
	* java/net/DatagramSocket.java
	(DatagramSocket): Two new methods.
	(bind): New method.
	(getChannel): New method.
	(isBound): New method.
	(send): Added newline to to make shorter lines.
	* java/net/PlainDatagramSocketImpl.java
	(mcastGrp): Added argument.
	(join): Use new mcastGrp.
	(leave): Use new mcastGrp.
	(joinGroup): New method.
	(leaveGroup): New method.
	* java/net/natPlainDatagramSocketImpl.cc
	(mcastGrp): Added argument, no yet really implemented.
	(getOption): Added newline for shorter lines.
	* java/net/natPlainSocketImpl.cc
	(read, setOption, getOption): Added newline for shorter lines.

From-SVN: r57380
This commit is contained in:
Michael Koch 2002-09-21 06:59:20 +00:00 committed by Michael Koch
parent 84d7dd4a53
commit be362a0d5b
7 changed files with 205 additions and 13 deletions

View file

@ -381,7 +381,7 @@ java::net::PlainSocketImpl::connect (java::net::SocketAddress *addr,
throw new java::net::SocketTimeoutException (
JvNewStringUTF("Connect timed out"));
}
else
else
#endif
{
if (_Jv_connect (fnum, ptr, len) != 0)
@ -588,7 +588,8 @@ java::net::PlainSocketImpl::read(void)
timeout_value.tv_sec = timeout / 1000;
timeout_value.tv_usec = (timeout % 1000) * 1000;
// Select on the fds.
int sel_retval = _Jv_select (fnum + 1, &read_fds, NULL, NULL, &timeout_value);
int sel_retval =
_Jv_select (fnum + 1, &read_fds, NULL, NULL, &timeout_value);
// If select returns 0 we've waited without getting data...
// that means we've timed out.
if (sel_retval == 0)
@ -647,7 +648,8 @@ java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count)
timeout_value.tv_sec = timeout / 1000;
timeout_value.tv_usec =(timeout % 1000) * 1000;
// Select on the fds.
int sel_retval = _Jv_select (fnum + 1, &read_fds, NULL, NULL, &timeout_value);
int sel_retval =
_Jv_select (fnum + 1, &read_fds, NULL, NULL, &timeout_value);
// We're only interested in the 0 return.
// error returns still require us to try to read
// the socket to see what happened.
@ -776,7 +778,8 @@ java::net::PlainSocketImpl::setOption (jint optID, java::lang::Object *value)
}
else
{
throw new java::lang::IllegalArgumentException (JvNewStringLatin1 ("`value' must be Boolean or Integer"));
throw new java::lang::IllegalArgumentException (
JvNewStringLatin1 ("`value' must be Boolean or Integer"));
}
switch (optID)
@ -968,8 +971,8 @@ java::net::PlainSocketImpl::getOption (jint optID)
}
#endif
else
throw
new java::net::SocketException (JvNewStringUTF ("invalid family"));
throw new java::net::SocketException (
JvNewStringUTF ("invalid family"));
localAddress = new java::net::InetAddress (laddr, NULL);
}
return localAddress;