< prev index next >

src/java.base/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java

Print this page




 167         return (fd == null && fd1 == null) ? true : false;
 168     }
 169 
 170     protected void close() {
 171         if (fd != null || fd1 != null) {
 172             SocketCleanable.unregister(fd);
 173             SocketCleanable.unregister(fd1);
 174             datagramSocketClose();
 175             ResourceManager.afterUdpClose();
 176             fd = null;
 177             fd1 = null;
 178         }
 179     }
 180 
 181     /* Native methods */
 182 
 183     protected synchronized native void bind0(int lport, InetAddress laddr,
 184                                              boolean exclBind)
 185         throws SocketException;
 186 
 187     protected native void send0(DatagramPacket p) throws IOException;
 188 
 189     protected synchronized native int peek(InetAddress i) throws IOException;
 190 
 191     protected synchronized native int peekData(DatagramPacket p) throws IOException;
 192 
 193     protected synchronized native void receive0(DatagramPacket p)
 194         throws IOException;
 195 
 196     protected native void setTimeToLive(int ttl) throws IOException;
 197 
 198     protected native int getTimeToLive() throws IOException;
 199 
 200     @Deprecated
 201     protected native void setTTL(byte ttl) throws IOException;
 202 
 203     @Deprecated
 204     protected native byte getTTL() throws IOException;
 205 
 206     protected native void join(InetAddress inetaddr, NetworkInterface netIf)
 207         throws IOException;




 167         return (fd == null && fd1 == null) ? true : false;
 168     }
 169 
 170     protected void close() {
 171         if (fd != null || fd1 != null) {
 172             SocketCleanable.unregister(fd);
 173             SocketCleanable.unregister(fd1);
 174             datagramSocketClose();
 175             ResourceManager.afterUdpClose();
 176             fd = null;
 177             fd1 = null;
 178         }
 179     }
 180 
 181     /* Native methods */
 182 
 183     protected synchronized native void bind0(int lport, InetAddress laddr,
 184                                              boolean exclBind)
 185         throws SocketException;
 186 
 187     protected native void send(DatagramPacket p) throws IOException;
 188 
 189     protected synchronized native int peek(InetAddress i) throws IOException;
 190 
 191     protected synchronized native int peekData(DatagramPacket p) throws IOException;
 192 
 193     protected synchronized native void receive0(DatagramPacket p)
 194         throws IOException;
 195 
 196     protected native void setTimeToLive(int ttl) throws IOException;
 197 
 198     protected native int getTimeToLive() throws IOException;
 199 
 200     @Deprecated
 201     protected native void setTTL(byte ttl) throws IOException;
 202 
 203     @Deprecated
 204     protected native byte getTTL() throws IOException;
 205 
 206     protected native void join(InetAddress inetaddr, NetworkInterface netIf)
 207         throws IOException;


< prev index next >