Exemplo n.º 1
0
 private Port getPort(int fd) {
   synchronized (this) {
     Port port = m_OpenPorts.get(fd);
     if (port == null) m_ErrNo = EBADF;
     return port;
   }
 }
Exemplo n.º 2
0
 public void shutDown() {
   for (Port port : m_OpenPorts.values()) {
     try {
       log = log && log(1, "shutDown() closing port %d\n", port.m_FD);
       port.close();
     } catch (Exception e) {
       // should never happen
       e.printStackTrace();
     }
   }
 }