• Home
  • Raw
  • Download

Lines Matching refs:rd

54         rd, wr = socketpair()
55 self.addCleanup(rd.close)
57 return rd, wr
63 rd, wr = self.make_socketpair()
65 key = s.register(rd, selectors.EVENT_READ, "data")
67 self.assertEqual(key.fileobj, rd)
68 self.assertEqual(key.fd, rd.fileno())
79 self.assertRaises(KeyError, s.register, rd, selectors.EVENT_READ)
82 self.assertRaises(KeyError, s.register, rd.fileno(),
89 rd, wr = self.make_socketpair()
91 s.register(rd, selectors.EVENT_READ)
92 s.unregister(rd)
98 self.assertRaises(KeyError, s.unregister, rd)
103 rd, wr = self.make_socketpair()
104 r, w = rd.fileno(), wr.fileno()
107 rd.close()
116 rd, wr = self.make_socketpair()
117 r, w = rd.fileno(), wr.fileno()
121 rd.close()
133 rd, wr = self.make_socketpair()
134 s.register(rd, selectors.EVENT_READ)
136 rd.close()
138 s.unregister(rd)
145 rd, wr = self.make_socketpair()
147 key = s.register(rd, selectors.EVENT_READ)
150 key2 = s.modify(rd, selectors.EVENT_WRITE)
152 self.assertEqual(key2, s.get_key(rd))
154 s.unregister(rd)
160 key = s.register(rd, selectors.EVENT_READ, d1)
161 key2 = s.modify(rd, selectors.EVENT_READ, d2)
164 self.assertEqual(key2, s.get_key(rd))
175 s.modify(rd, selectors.EVENT_READ, d3)
199 rd, wr = self.make_socketpair()
200 s.register(rd, selectors.EVENT_READ)
203 s.modify(rd, selectors.EVENT_WRITE)
211 rd, wr = self.make_socketpair()
213 s.register(rd, selectors.EVENT_READ)
217 self.assertRaises(RuntimeError, s.get_key, rd)
219 self.assertRaises(KeyError, mapping.__getitem__, rd)
226 rd, wr = self.make_socketpair()
228 key = s.register(rd, selectors.EVENT_READ, "data")
229 self.assertEqual(key, s.get_key(rd))
238 rd, wr = self.make_socketpair()
244 key = s.register(rd, selectors.EVENT_READ, "data")
245 self.assertIn(rd, keys)
246 self.assertEqual(key, keys[rd])
248 self.assertEqual(list(keys), [rd.fileno()])
257 del keys[rd]
263 rd, wr = self.make_socketpair()
265 s.register(rd, selectors.EVENT_READ)
281 rd, wr = self.make_socketpair()
284 sel.register(rd, selectors.EVENT_READ)
287 self.assertRaises(RuntimeError, s.get_key, rd)
312 rd, wr = self.make_socketpair()
313 s.register(rd, selectors.EVENT_READ)
315 readers.append(rd)
317 r2w[rd] = wr
318 w2r[wr] = rd
342 rd = ready_readers[0]
343 buf = rd.recv(MSG_LEN)
346 s.unregister(r2w[rd])
347 s.unregister(rd)
348 writers.remove(r2w[rd])
365 rd, wr = self.make_socketpair()
374 s.register(rd, selectors.EVENT_READ)
393 rd, wr = self.make_socketpair()
407 s.register(rd, selectors.EVENT_READ)
423 rd, wr = self.make_socketpair()
431 s.register(rd, selectors.EVENT_READ)
468 rd, wr = self.make_socketpair()
476 s.register(rd, selectors.EVENT_READ)