• Home
  • Raw
  • Download

Lines Matching refs:sock

31         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
34 self.sock.close()
38 self.assertEqual(self.sock.gettimeout(), None,
43 self.sock.settimeout(7.345)
44 self.assertEqual(self.sock.gettimeout(), 7.345)
46 self.sock.settimeout(3)
47 self.assertEqual(self.sock.gettimeout(), 3)
49 self.sock.settimeout(None)
50 self.assertEqual(self.sock.gettimeout(), None)
54 self.sock.settimeout(1)
55 self.assertEqual(type(self.sock.gettimeout()), type(1.0))
57 self.sock.settimeout(3.9)
58 self.assertEqual(type(self.sock.gettimeout()), type(1.0))
62 self.sock.settimeout(0)
63 self.sock.settimeout(0)
64 self.sock.settimeout(0.0)
65 self.sock.settimeout(None)
66 self.assertRaises(TypeError, self.sock.settimeout, "")
67 self.assertRaises(TypeError, self.sock.settimeout, "")
68 self.assertRaises(TypeError, self.sock.settimeout, ())
69 self.assertRaises(TypeError, self.sock.settimeout, [])
70 self.assertRaises(TypeError, self.sock.settimeout, {})
71 self.assertRaises(TypeError, self.sock.settimeout, 0j)
75 self.assertRaises(ValueError, self.sock.settimeout, -1)
76 self.assertRaises(ValueError, self.sock.settimeout, -1)
77 self.assertRaises(ValueError, self.sock.settimeout, -1.0)
81 self.sock.settimeout(10)
82 self.sock.setblocking(1)
83 self.assertEqual(self.sock.gettimeout(), None)
84 self.sock.setblocking(0)
85 self.assertEqual(self.sock.gettimeout(), 0.0)
87 self.sock.settimeout(10)
88 self.sock.setblocking(0)
89 self.assertEqual(self.sock.gettimeout(), 0.0)
90 self.sock.setblocking(1)
91 self.assertEqual(self.sock.gettimeout(), None)
95 self.sock.setblocking(0)
96 self.sock.settimeout(1)
97 self.assertEqual(self.sock.gettimeout(), 1)
99 self.sock.setblocking(1)
100 self.sock.settimeout(1)
101 self.assertEqual(self.sock.gettimeout(), 1)
127 self.sock.settimeout(timeout)
128 method = getattr(self.sock, method)
147 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
151 self.sock.close()
200 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
205 sock.settimeout(timeout)
207 sock.connect((whitehole))
214 sock.close()
215 del sock
240 self.sock.connect(self.addr_remote)
245 support.bind_port(self.sock, self.localhost)
246 self.sock.listen()
254 self.sock.connect(serv.getsockname())
263 self.sock.connect(serv.getsockname())
273 self.sock.connect(serv.getsockname())
282 self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
285 self.sock.close()
290 support.bind_port(self.sock, self.localhost)