54 |
boolean connected = false; |
boolean connected = false; |
55 |
InetSocketAddress sa; |
InetSocketAddress sa; |
56 |
|
|
|
// private static native int NioSocketAccept (ServerSocketChannelImpl server, |
|
|
// SocketChannelImpl s); |
|
|
|
|
57 |
private static int NioSocketAccept (ServerSocketChannelImpl server, |
private static int NioSocketAccept (ServerSocketChannelImpl server, |
58 |
SocketChannelImpl s) |
SocketChannelImpl s) |
59 |
{ |
{ |
79 |
public void finalizer() |
public void finalizer() |
80 |
{ |
{ |
81 |
if (connected) |
if (connected) |
82 |
{ |
{ |
83 |
try |
try |
84 |
{ |
{ |
85 |
close(); |
close (); |
86 |
} |
} |
87 |
catch (Exception e) |
catch (Exception e) |
88 |
{ |
{ |
89 |
} |
} |
90 |
} |
} |
91 |
} |
} |
92 |
|
|
93 |
protected void implCloseSelectableChannel () throws IOException |
protected void implCloseSelectableChannel () throws IOException |
97 |
fd = SocketChannelImpl.SocketCreate (); |
fd = SocketChannelImpl.SocketCreate (); |
98 |
} |
} |
99 |
|
|
100 |
protected void implConfigureBlocking (boolean block) throws IOException |
protected void implConfigureBlocking (boolean blocking) throws IOException |
101 |
{ |
{ |
102 |
blocking = block; |
this.blocking = blocking; |
103 |
} |
} |
104 |
|
|
105 |
public SocketChannel accept () |
public SocketChannel accept () throws IOException |
106 |
{ |
{ |
107 |
SocketChannelImpl result = new SocketChannelImpl (provider ()); |
SocketChannelImpl result = new SocketChannelImpl (provider ()); |
108 |
result.sa = new InetSocketAddress (0); |
result.sa = new InetSocketAddress (0); |