2003-06-14 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/FileChannelImpl.java (map_address): Removed incorrect comment. * gnu/java/nio/SelectorImpl.java (register): Remove code duplication and code for file channel handling. * gnu/java/nio/ServerSocketChannelImpl.java (serverSocket): Renamed from sock_object. (ServerSocketChannel): Initialize serverSocket. (socket): Return serverSocket. * gnu/java/nio/SocketChannelImpl.java (socket): Renamed from sock_object. (isConnectionPenging): Simplified. (socket): Return socket. From-SVN: r67940
This commit is contained in:
parent
34e8290f95
commit
81d2d258f5
5 changed files with 34 additions and 42 deletions
|
@ -35,6 +35,7 @@ this exception to your version of the library, but you are not
|
|||
obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. */
|
||||
|
||||
|
||||
package gnu.java.nio;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -50,7 +51,7 @@ import gnu.classpath.Configuration;
|
|||
|
||||
public class SocketChannelImpl extends SocketChannel
|
||||
{
|
||||
Socket sock_object;
|
||||
Socket socket;
|
||||
int fd;
|
||||
int local_port;
|
||||
boolean blocking = true;
|
||||
|
@ -141,20 +142,17 @@ public class SocketChannelImpl extends SocketChannel
|
|||
|
||||
public boolean isConnectionPending ()
|
||||
{
|
||||
if (blocking)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return blocking ? true : false;
|
||||
}
|
||||
|
||||
public Socket socket ()
|
||||
{
|
||||
if (sock_object != null)
|
||||
if (socket != null)
|
||||
{
|
||||
//sock_object.ch = this;
|
||||
//socket.ch = this;
|
||||
}
|
||||
|
||||
return sock_object;
|
||||
return socket;
|
||||
}
|
||||
|
||||
public int read (ByteBuffer dst) throws IOException
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue