Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: third_party/twisted_8_1/twisted/protocols/wire.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/twisted_8_1/twisted/protocols/wire.py
diff --git a/third_party/twisted_8_1/twisted/protocols/wire.py b/third_party/twisted_8_1/twisted/protocols/wire.py
deleted file mode 100644
index 3bcbec114fefc73cf7a1bcb3aa084dc0285150cb..0000000000000000000000000000000000000000
--- a/third_party/twisted_8_1/twisted/protocols/wire.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
-# See LICENSE for details.
-
-"""Implement standard (and unused) TCP protocols.
-
-These protocols are either provided by inetd, or are not provided at all.
-"""
-
-# system imports
-import time, struct
-from zope.interface import implements
-
-# twisted import
-from twisted.internet import protocol, interfaces
-
-
-class Echo(protocol.Protocol):
- """As soon as any data is received, write it back (RFC 862)"""
-
- def dataReceived(self, data):
- self.transport.write(data)
-
-
-class Discard(protocol.Protocol):
- """Discard any received data (RFC 863)"""
-
- def dataReceived(self, data):
- # I'm ignoring you, nyah-nyah
- pass
-
-
-class Chargen(protocol.Protocol):
- """Generate repeating noise (RFC 864)"""
- noise = r'@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&?'
-
- implements(interfaces.IProducer)
-
- def connectionMade(self):
- self.transport.registerProducer(self, 0)
-
- def resumeProducing(self):
- self.transport.write(self.noise)
-
- def pauseProducing(self):
- pass
-
- def stopProducing(self):
- pass
-
-
-class QOTD(protocol.Protocol):
- """Return a quote of the day (RFC 865)"""
-
- def connectionMade(self):
- self.transport.write(self.getQuote())
- self.transport.loseConnection()
-
- def getQuote(self):
- """Return a quote. May be overrriden in subclasses."""
- return "An apple a day keeps the doctor away.\r\n"
-
-class Who(protocol.Protocol):
- """Return list of active users (RFC 866)"""
-
- def connectionMade(self):
- self.transport.write(self.getUsers())
- self.transport.loseConnection()
-
- def getUsers(self):
- """Return active users. Override in subclasses."""
- return "root\r\n"
-
-
-class Daytime(protocol.Protocol):
- """Send back the daytime in ASCII form (RFC 867)"""
-
- def connectionMade(self):
- self.transport.write(time.asctime(time.gmtime(time.time())) + '\r\n')
- self.transport.loseConnection()
-
-
-class Time(protocol.Protocol):
- """Send back the time in machine readable form (RFC 868)"""
-
- def connectionMade(self):
- # is this correct only for 32-bit machines?
- result = struct.pack("!i", int(time.time()))
- self.transport.write(result)
- self.transport.loseConnection()
-
« no previous file with comments | « third_party/twisted_8_1/twisted/protocols/toc.py ('k') | third_party/twisted_8_1/twisted/protocols/xmlstream.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698