port doubling (or...)?
logiplexsoftware at earthlink.net
Tue Jan 29 16:13:09 EST 2002
On Tue, 29 Jan 2002 19:29:58 -0000
> the client connects to the pserver, then it sends data to uoserver.
So the client is connecting to both simultaneously? "it" is ambiguous
> if the uoserver connects the pserver sends the data to the client.
> note: the pserver is on the machine which runs the client to keep
> performance on the uoserver pc low.
> or how would i do that or what would be the advantages or
It won't be a problem running the pserver on the client machine and this
should definitely provide a performance boost, as the pserver won't have to
handle requests from more than one client.
> sorry for the long posts and annoying questions.
Not a problem.
> this give sme errors:( i the ipaddrmatch line:
I did some tests, and my smtp server returns a line like such:
(250, 'pintail.mail.pas.earthlink.net Hello apx1-04-57.pdx.du.teleport.com
This is a tuple, not a string, so you'll have to use smtpconnhelo in
your regular expression.
This worked for me:
>>> smtpconnhelo = smtpconn.helo()
>>> m = re.search("[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+", smtpconnhelo)
> def getipaddr():
> smtpconn = smtplib.SMTP("mail.mojam.com")
> smtpconnhelo = smtpconn.helo()
> ipaddrmatch = re.search("([0-9] + \.[0-9] + \.[0-9] + \.[0-9]
> + )", smtpconnhelo)
> if ipadrrmatch is not None:
> return ipaddrmatch.group(1)
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308
(800) 735-0555 x308
"Then with your new power you'll accomplish all sorts of cool stuff
in no time, and We'll All Be Sorry. At that point you can either
gloat a bit, and then relent, or go ahead and send the robot army
after us." - Quinn Dunkan
More information about the Python-list