(fd, is_server)
| 186 | } |
| 187 | |
| 188 | function createHandle(fd, is_server) { |
| 189 | validateInt32(fd, 'fd', 0); |
| 190 | const type = guessHandleType(fd); |
| 191 | if (type === 'PIPE') { |
| 192 | return new Pipe( |
| 193 | is_server ? PipeConstants.SERVER : PipeConstants.SOCKET, |
| 194 | ); |
| 195 | } |
| 196 | |
| 197 | if (type === 'TCP') { |
| 198 | return new TCP( |
| 199 | is_server ? TCPConstants.SERVER : TCPConstants.SOCKET, |
| 200 | ); |
| 201 | } |
| 202 | |
| 203 | throw new ERR_INVALID_FD_TYPE(type); |
| 204 | } |
| 205 | |
| 206 | |
| 207 | function getNewAsyncId(handle) { |
no test coverage detected
searching dependent graphs…