port doubling (or...)?

Cliff Wells logiplexsoftware at earthlink.net
Tue Jan 29 22:13:09 CET 2002


On Tue, 29 Jan 2002 19:29:58 -0000
maximilianscherr wrote:

> the client connects to the pserver, then it sends data to uoserver.

So the client is connecting to both simultaneously?  "it" is ambiguous
here...

> 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 
> disadvantages?

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
[216.26.2.57]')

This is a tuple, not a string, so you'll have to use smtpconnhelo[1] in
your regular expression.
This worked for me:

>>> smtpconnhelo = smtpconn.helo()
>>> m = re.search("[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+", smtpconnhelo[1])
>>> m.group()
'216.26.2.57'

> def getipaddr():
>     smtpconn = smtplib.SMTP("mail.mojam.com")
>     smtpconnhelo = smtpconn.helo()
>     smtpconn.quit()
>     ipaddrmatch = re.search("([0-9] + \.[0-9] + \.[0-9] + \.[0-9] 
> + )", smtpconnhelo)
>     if ipadrrmatch is not None:
>         return ipaddrmatch.group(1)
> 

-- 
Cliff Wells
Software Engineer
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 mailing list