Пример #1
0
 public TcpSocket bind(TcpSocket fan, IpAddr addr, Long port) {
   try {
     InetAddress javaAddr = (addr == null) ? null : addr.peer.java;
     int javaPort = (port == null) ? 0 : port.intValue();
     socket.bind(new InetSocketAddress(javaAddr, javaPort));
     return fan;
   } catch (IOException e) {
     throw IOErr.make(e);
   }
 }
Пример #2
0
 public void setOutBufferSize(TcpSocket fan, Long v) {
   if (in != null) throw Err.make("Must set outBufSize before connection");
   outBufSize = (v == null) ? 0 : v.intValue();
 }