[CalendarServer-changes] [5405] CalendarServer/branches/users/glyph/sendfdport/calendarserver/tap/ caldav.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 26 02:55:09 PDT 2010


Revision: 5405
          http://trac.macosforge.org/projects/calendarserver/changeset/5405
Author:   glyph at apple.com
Date:     2010-03-26 02:55:09 -0700 (Fri, 26 Mar 2010)
Log Message:
-----------
Provide the implicit, private contract that tcp.Server requires of tcp.Port.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/sendfdport/calendarserver/tap/caldav.py

Modified: CalendarServer/branches/users/glyph/sendfdport/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/branches/users/glyph/sendfdport/calendarserver/tap/caldav.py	2010-03-26 02:04:46 UTC (rev 5404)
+++ CalendarServer/branches/users/glyph/sendfdport/calendarserver/tap/caldav.py	2010-03-26 09:55:09 UTC (rev 5405)
@@ -642,8 +642,16 @@
             def myTransportFactory(skt, data, protocol):
                 from twisted.internet.tcp import Server
                 from twisted.internet import reactor
+
+                class JustEnoughLikeAPort(object):
+                    """
+                    Fake out just enough of L{tcp.Port} to be acceptable to
+                    L{tcp.Server}...
+                    """
+                    _realPortNumber = 'inherited'
+
                 transport = Server(skt, protocol,
-                                   skt.getpeername(), skt.getsockname(),
+                                   skt.getpeername(), JustEnoughLikeAPort,
                                    4321, reactor)
                 if data == 'SSL':
                     transport.startTLS(self.createContextFactory())
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100326/80dd8bf3/attachment-0001.html>


More information about the calendarserver-changes mailing list