All pastes #284075 Raw Edit

Unnamed

public text v1 · immutable
#284075 ·published 2006-12-18 21:06 UTC
rendered paste body
#!/usr/bin/python


from twisted.internet.protocol import Factory
from twisted.internet import reactor

#Prova 2
from twisted.protocols.basic import LineReceiver

class BurnixSP2(LineReceiver):
	def connectionMade(self):
		self.sendLine("Hello!")

	def lineReceived(self, line):
		self.sendLine("linia!\r\n")


# Next lines are magic:
factory = Factory()
factory.protocol = BurnixSP2
# listen in port 1337
reactor.listenTCP(1337, factory)
reactor.run()