< prev index next >

src/java.base/unix/classes/java/net/PlainDatagramSocketImpl.java

Print this page




  40     static {
  41         init();
  42     }
  43 
  44     protected void socketSetOption(int opt, Object val) throws SocketException {
  45         if (opt == SocketOptions.SO_REUSEPORT &&
  46             !supportedOptions().contains(StandardSocketOptions.SO_REUSEPORT)) {
  47             throw new UnsupportedOperationException("unsupported option");
  48         }
  49         try {
  50             socketSetOption0(opt, val);
  51         } catch (SocketException se) {
  52             if (!connected)
  53                 throw se;
  54         }
  55     }
  56 
  57     protected synchronized native void bind0(int lport, InetAddress laddr)
  58         throws SocketException;
  59 
  60     protected native void send0(DatagramPacket p) throws IOException;
  61 
  62     protected synchronized native int peek(InetAddress i) throws IOException;
  63 
  64     protected synchronized native int peekData(DatagramPacket p) throws IOException;
  65 
  66     protected synchronized native void receive0(DatagramPacket p)
  67         throws IOException;
  68 
  69     protected native void setTimeToLive(int ttl) throws IOException;
  70 
  71     protected native int getTimeToLive() throws IOException;
  72 
  73     @Deprecated
  74     protected native void setTTL(byte ttl) throws IOException;
  75 
  76     @Deprecated
  77     protected native byte getTTL() throws IOException;
  78 
  79     protected native void join(InetAddress inetaddr, NetworkInterface netIf)
  80         throws IOException;




  40     static {
  41         init();
  42     }
  43 
  44     protected void socketSetOption(int opt, Object val) throws SocketException {
  45         if (opt == SocketOptions.SO_REUSEPORT &&
  46             !supportedOptions().contains(StandardSocketOptions.SO_REUSEPORT)) {
  47             throw new UnsupportedOperationException("unsupported option");
  48         }
  49         try {
  50             socketSetOption0(opt, val);
  51         } catch (SocketException se) {
  52             if (!connected)
  53                 throw se;
  54         }
  55     }
  56 
  57     protected synchronized native void bind0(int lport, InetAddress laddr)
  58         throws SocketException;
  59 
  60     protected native void send(DatagramPacket p) throws IOException;
  61 
  62     protected synchronized native int peek(InetAddress i) throws IOException;
  63 
  64     protected synchronized native int peekData(DatagramPacket p) throws IOException;
  65 
  66     protected synchronized native void receive0(DatagramPacket p)
  67         throws IOException;
  68 
  69     protected native void setTimeToLive(int ttl) throws IOException;
  70 
  71     protected native int getTimeToLive() throws IOException;
  72 
  73     @Deprecated
  74     protected native void setTTL(byte ttl) throws IOException;
  75 
  76     @Deprecated
  77     protected native byte getTTL() throws IOException;
  78 
  79     protected native void join(InetAddress inetaddr, NetworkInterface netIf)
  80         throws IOException;


< prev index next >