Martin Gergov committed edee932

Fixed summary in README and some cosmetic changes to other files.

Comments (0)

Files changed (5)

+This package provides integration of udt as a transport protocol in twisted.
+It works by replacing the default epoll reactor with a modified one. Also, it
+provides top-level api for listening and connecting to udt transports.
-Integration of udt as a transport protocol in twisted.
+ Usage
+Check examples/
+When using twistd or trial, put: -r udtepoll
 #) PyUDT
 #) twisted
 #) Tests from twisted pass only in internet/ and protocol/,
    for the others they just seem to "hang" (something to do
    with flags, probably)
+#) DatagramProtocol is far from beign a best fit for the high-level interface
+   API. It will be replaced with IProtocol, thus providing a functionality
+   similar to listen/connectTCP.


 class UDTClient(DatagramProtocol):
+    identifier = 0
     def doSend1(self):
-        self.transport.write("?>!", ("", 5000))
+        self.transport.write("?>!{0}".format(self.identifier),
+                             ("", 5000))
     def datagramReceived(self, data, (host, port)):
         print "Received %r" % data
-        self.transport.write("bomb!!!", ("", 5000))
+        self.transport.write("bomb!!!{0}".format(self.identifier),
+                                                ("", 5000))
 udtclient = UDTClient()
+udtclient2 = UDTClient()
+udtclient2.identifier = 1
+print udtclient2.identifier
 reactor.connectUDT("", 5000, udtclient)
+reactor.connectUDT("", 5000, udtclient2)
 reactor.callLater(1, udtclient.doSend1)
+reactor.callLater(1, udtclient2.doSend1)
 # from udt4 import socket, listen, UDTepoll, bind, recvmsg, UDTException