private Port getPort(int fd) { synchronized (this) { Port port = m_OpenPorts.get(fd); if (port == null) m_ErrNo = EBADF; return port; } }
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(); } } }