Пример #1
0
 /** {@inheritDoc} */
 public boolean isReuseAddress() {
   try {
     return Socket.optGet(getDescriptor(), Socket.APR_SO_REUSEADDR) == 1;
   } catch (Exception e) {
     throw new RuntimeIoException("Failed to get SO_REUSEADDR.", e);
   }
 }
Пример #2
0
 /** {@inheritDoc} */
 public int getReceiveBufferSize() {
   try {
     return Socket.optGet(getDescriptor(), Socket.APR_SO_RCVBUF);
   } catch (Exception e) {
     throw new RuntimeException("APR Exception", e);
   }
 }