You shouldn't bind your client on a port where your server is listening to.
--- Alvin On Fri, Jan 9, 2009 at 9:23 PM, Alessio Pace <alessio.p...@gmail.com> wrote: > Hi, > > I would lilke tro listen on a given TCP port and initiate multiple TCP > client connections from the same port, but I'm encountering the classical: > > <class 'twisted.internet.error.ConnectBindError'>: Couldn't bind: 98: > Address already in use > > My code is: > > ###################################### > > factory = Factory() > # an almost empy subclass of Protocol > factory.protocol = TCPServer > > reactor.listenTCP(12345, factory) > > # ClientFactory subclass which simply instantiate a TCPClient Protocol > client_factory = TCPClientFactory() > > # last tuple is the bindAdress parameter > reactor.connectTCP(target_addr, 12345, client_factory, 30, > (source_addr, 12345)) > > ####################################### > > I've tried to look on the Internet and in the source code but I've not > found a proper solution. > > Thanks in advance for any suggestion. > Alessio Pace. > > > _______________________________________________ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > > -- http://www.alvinatorsplayground.blogspot.com/
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python