Lines Matching refs:sock
72 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)
73 sock.settimeout(1)
74 BpfProgAttach(sock.fileno(), prog_fd)
76 sock.bind((addr, 0))
77 addr = sock.getsockname()
79 sock.sendto("foo", addr)
80 data, addr = csocket.Recvfrom(sock, 4096, 0)
92 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)
93 sock.settimeout(1)
94 BpfProgAttach(sock.fileno(), prog_fd)
96 sock.bind((addr, 0))
97 addr = sock.getsockname()
98 sock.sendto("foo", addr)
99 self.assertRaisesErrno(errno.EAGAIN, csocket.Recvfrom, sock, 4096, 0)
135 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)
136 sock.settimeout(1)
137 BpfProgAttach(sock.fileno(), prog_fd)
139 sock.bind((addr, 0))
140 addr = sock.getsockname()
144 sock.sendto("foo", addr)
145 data, retaddr = csocket.Recvfrom(sock, 4096, 0)