| 162 | } |
| 163 | |
| 164 | void UnixSocketPort::DeInit() { |
| 165 | // End thread and wait for it (no-op if never started). |
| 166 | accept_thread_.Terminate(); |
| 167 | |
| 168 | if (listen_fd_ != kNotConnectedFd) { |
| 169 | close(listen_fd_); |
| 170 | } |
| 171 | if (client_fd_ != kNotConnectedFd) { |
| 172 | close(client_fd_); |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | int UnixSocketPort::RecvPackets(queue_t qid, bess::Packet **pkts, int cnt) { |
| 177 | int client_fd = client_fd_; |