[Tutor] How to write server which listens to specific port

Alan Gauld alan.gauld at btinternet.com
Fri Apr 10 10:23:36 CEST 2009


"ShivKumar Anand" <shiv_mbm at hotmail.com> wrote

> I have developed an application in Python 2.4.2, TurboGears 1.0, cherryPy 
> 2.3.1.

Well done.

> Now, I have to develop a server, which listens to a specific port (104)
> and save the file to a specific location (/tmp/myDir) on RHEL 4/5.

Does this server have anything to do with your TurboGears application?
Or is it something brand new? Turbo gears can be configured to use
any port using the config files.

 If its new, what protocol are you using? Is it http or tcp/ip or raw IP
or something else?

> Guide me how to do that. what all packages I have to use.

At the most basic level you can use the socket module and do it all
from scratch, but if its a higher lervel protocol there may be higher level
modules already written that will help.

We need to know a lot more about the problem and the
environment - what kind of computer/OS etc.


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 




More information about the Tutor mailing list