Lines Matching refs:socket
27 import socket
38 def fake_adbd(protocol=socket.AF_INET, port=0):
41 serversock = socket.socket(protocol, socket.SOCK_STREAM)
42 serversock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
43 if protocol == socket.AF_INET:
50 readsock, writesock = socket.socketpair()
81 ready.shutdown(socket.SHUT_RDWR)
295 sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
298 linger = sock.getsockopt(socket.SOL_SOCKET, socket.SO_LINGER, 16)
308 socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as listener:
311 listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
376 socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock:
397 for protocol in (socket.AF_INET, socket.AF_INET6):
403 except socket.error: