This shows you the differences between two versions of the page.
— |
public:howto:tcpserver [2007/11/30 14:30] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== How Can I Write A TCP Server? ====== | ||
+ | |||
+ | See the demos directory (/source/demo) of the distribution package. The Echo server would be a good sample for you! | ||
+ | |||
+ | I Tried The ECHO Demo Under Kylix, But It Didn't Work. Why? | ||
+ | |||
+ | * Because this demo uses standard port 8 for echo. However Linux systems usually have their echo server at this port. Simply change the source of the Demo to use another port instead of 'echo' (e.g. 2000). | ||
+ | * Because you need to be root (or equivalent) to bind ports below 1024 | ||
+ | |||
+ | You can see other TCP server examples in demos directory. See HTTP proxy demo or HTTP Server demo. | ||