1
I’m following a tutorial to use Twisted to establish connection to an app. However, when testing the connection to localhost for testing, it seems that it is not responding.
I am using the following script in chatserver.py file :
from twisted.internet.protocol import Factory, Protocol
from twisted.internet import reactor
class IphoneChat(Protocol):
def connectionMade(self):
print " um cliente conectado"
factory = Factory()
factory.protoco = IphoneChat
reactor.listenTCP(80, factory)
print "Iphone Chat server started"
reactor.run()
Then I open another console window to test with the following command:
telnet localhost 80
And the following error returns to me:
Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused telnet: Unable to connect to remote host
How I can make Twisted work on Mac OSX?