MCPcopy Index your code
hub / github.com/RustPython/RustPython / PipeClient

Function PipeClient

Lib/multiprocessing/connection.py:712–737  ·  view source on GitHub ↗

Return a connection object connected to the pipe given by `address`

(address)

Source from the content-addressed store, hash-verified

710 _winapi.CloseHandle(handle)
711
712 def PipeClient(address):
713 '''
714 Return a connection object connected to the pipe given by `address`
715 '''
716 t = _init_timeout()
717 while 1:
718 try:
719 _winapi.WaitNamedPipe(address, 1000)
720 h = _winapi.CreateFile(
721 address, _winapi.GENERIC_READ | _winapi.GENERIC_WRITE,
722 0, _winapi.NULL, _winapi.OPEN_EXISTING,
723 _winapi.FILE_FLAG_OVERLAPPED, _winapi.NULL
724 )
725 except OSError as e:
726 if e.winerror not in (_winapi.ERROR_SEM_TIMEOUT,
727 _winapi.ERROR_PIPE_BUSY) or _check_timeout(t):
728 raise
729 else:
730 break
731 else:
732 raise
733
734 _winapi.SetNamedPipeHandleState(
735 h, _winapi.PIPE_READMODE_MESSAGE, None, None
736 )
737 return PipeConnection(h)
738
739#
740# Authentication stuff

Callers 1

ClientFunction · 0.85

Calls 3

_init_timeoutFunction · 0.85
_check_timeoutFunction · 0.85
PipeConnectionClass · 0.85

Tested by

no test coverage detected