(self, first)
| 268 | return tmp |
| 269 | |
| 270 | def _server_pipe_handle(self, first): |
| 271 | # Return a wrapper for a new pipe handle. |
| 272 | if self.closed(): |
| 273 | return None |
| 274 | flags = _winapi.PIPE_ACCESS_DUPLEX | _winapi.FILE_FLAG_OVERLAPPED |
| 275 | if first: |
| 276 | flags |= _winapi.FILE_FLAG_FIRST_PIPE_INSTANCE |
| 277 | h = _winapi.CreateNamedPipe( |
| 278 | self._address, flags, |
| 279 | _winapi.PIPE_TYPE_MESSAGE | _winapi.PIPE_READMODE_MESSAGE | |
| 280 | _winapi.PIPE_WAIT, |
| 281 | _winapi.PIPE_UNLIMITED_INSTANCES, |
| 282 | windows_utils.BUFSIZE, windows_utils.BUFSIZE, |
| 283 | _winapi.NMPWAIT_WAIT_FOREVER, _winapi.NULL) |
| 284 | pipe = windows_utils.PipeHandle(h) |
| 285 | self._free_instances.add(pipe) |
| 286 | return pipe |
| 287 | |
| 288 | def closed(self): |
| 289 | return (self._address is None) |
no test coverage detected