Creates a temporary fifo. You must then use open_fifo() on the server_fd once the client is connected to use it. :returns: (client_file, server_fd)
()
| 232 | |
| 233 | |
| 234 | def _create_fifo() -> Tuple[str, Any]: |
| 235 | """Creates a temporary fifo. |
| 236 | |
| 237 | You must then use open_fifo() on the server_fd once |
| 238 | the client is connected to use it. |
| 239 | |
| 240 | :returns: (client_file, server_fd) |
| 241 | """ |
| 242 | if WINDOWS: |
| 243 | from scapy.arch.windows.structures import _get_win_fifo |
| 244 | return _get_win_fifo() |
| 245 | else: |
| 246 | f = get_temp_file() |
| 247 | os.unlink(f) |
| 248 | os.mkfifo(f) |
| 249 | return f, f |
| 250 | |
| 251 | |
| 252 | def _open_fifo(fd: Any, mode: str = "rb") -> IO[bytes]: |
no test coverage detected