@ -31,7 +31,12 @@ class Reactor:
for stream in writable:
fileno = stream.fileno()
obj = self.objmap[fileno]
try:
except KeyError, e:
# The client has disconnected. Skip to the next stream.
continue
if obj.objtype == "client":
obj._write_cycle()
@ -1,7 +1,7 @@
import pyreactor, time
from testclient import TestClient
c = TestClient(host="127.0.0.1", port=4006)
c = TestClient(host="kerpia.cryto.net", port=4006)
c.send({"test": "just sending some test data...", "number": 41, "file": open("testdata.dat", "rb")})
s = pyreactor.Server("127.0.0.1", 4006, TestClient)
s = pyreactor.Server("0.0.0.0", 4006, TestClient)
reactor = pyreactor.Reactor()
reactor.add(s)