• Home
  • Raw
  • Download

Lines Matching refs:rd

55         rd, wr = socketpair()
56 self.addCleanup(rd.close)
58 return rd, wr
64 rd, wr = self.make_socketpair()
66 key = s.register(rd, selectors.EVENT_READ, "data")
68 self.assertEqual(key.fileobj, rd)
69 self.assertEqual(key.fd, rd.fileno())
80 self.assertRaises(KeyError, s.register, rd, selectors.EVENT_READ)
83 self.assertRaises(KeyError, s.register, rd.fileno(),
90 rd, wr = self.make_socketpair()
92 s.register(rd, selectors.EVENT_READ)
93 s.unregister(rd)
99 self.assertRaises(KeyError, s.unregister, rd)
104 rd, wr = self.make_socketpair()
105 r, w = rd.fileno(), wr.fileno()
108 rd.close()
117 rd, wr = self.make_socketpair()
118 r, w = rd.fileno(), wr.fileno()
122 rd.close()
134 rd, wr = self.make_socketpair()
135 s.register(rd, selectors.EVENT_READ)
137 rd.close()
139 s.unregister(rd)
146 rd, wr = self.make_socketpair()
148 key = s.register(rd, selectors.EVENT_READ)
151 key2 = s.modify(rd, selectors.EVENT_WRITE)
153 self.assertEqual(key2, s.get_key(rd))
155 s.unregister(rd)
161 key = s.register(rd, selectors.EVENT_READ, d1)
162 key2 = s.modify(rd, selectors.EVENT_READ, d2)
165 self.assertEqual(key2, s.get_key(rd))
176 s.modify(rd, selectors.EVENT_READ, d3)
200 rd, wr = self.make_socketpair()
201 s.register(rd, selectors.EVENT_READ)
204 s.modify(rd, selectors.EVENT_WRITE)
212 rd, wr = self.make_socketpair()
214 s.register(rd, selectors.EVENT_READ)
218 self.assertRaises(RuntimeError, s.get_key, rd)
220 self.assertRaises(KeyError, mapping.__getitem__, rd)
227 rd, wr = self.make_socketpair()
229 key = s.register(rd, selectors.EVENT_READ, "data")
230 self.assertEqual(key, s.get_key(rd))
239 rd, wr = self.make_socketpair()
245 key = s.register(rd, selectors.EVENT_READ, "data")
246 self.assertIn(rd, keys)
247 self.assertEqual(key, keys[rd])
249 self.assertEqual(list(keys), [rd.fileno()])
258 del keys[rd]
264 rd, wr = self.make_socketpair()
266 s.register(rd, selectors.EVENT_READ)
282 rd, wr = self.make_socketpair()
285 sel.register(rd, selectors.EVENT_READ)
288 self.assertRaises(RuntimeError, s.get_key, rd)
313 rd, wr = self.make_socketpair()
314 s.register(rd, selectors.EVENT_READ)
316 readers.append(rd)
318 r2w[rd] = wr
319 w2r[wr] = rd
343 rd = ready_readers[0]
344 buf = rd.recv(MSG_LEN)
347 s.unregister(r2w[rd])
348 s.unregister(rd)
349 writers.remove(r2w[rd])
366 rd, wr = self.make_socketpair()
375 s.register(rd, selectors.EVENT_READ)
394 rd, wr = self.make_socketpair()
408 s.register(rd, selectors.EVENT_READ)
424 rd, wr = self.make_socketpair()
432 s.register(rd, selectors.EVENT_READ)
469 rd, wr = self.make_socketpair()
477 s.register(rd, selectors.EVENT_READ)