On 14 Oct 2005, at 08:33, Oliver Schroeder wrote:

Finding the "right" port isn't easy, since we have about 32 thousand (64 

thousand on newer OSes) to choose from ;)

However, I decided to use port 5000 on the server-side (and 5001 for telnet), 

both ports are configurable but these are the defaults. Both ports are only 

used by the free internet chess server (fics), which uses tcp. The udp ports 

are not used, yet. (AFAIK)

Although a client can choose any incoming port he prefers, my personal 

predilection is to use the same port as used for outgoing. (=5000)


It would be better to pick a port range that is entirely unused, for two reasons:

- I think there's an implicit assumption that if the TCP port is well-known, the UDP port is reserved for your use

- This stops FG providing a TCP alternative to UDP on the same port, which is something I think should be done anyway. Requiring people to update their firewall NAT tables is not a long term approach, even assuming the user is permittd to do such a thing; a much better approach is to have a 'try UDP, fall back to TCP approach', since TCP traversal from inside the firewall to out 'just works' with most NAT boxes. (One solution to using UDP is to implement Microsoft's UPnP system for asking the firewall to set up a dynamic port forward, but we looked at doing that for WorldForge and .... it's horrible. Really big spec. Nasty.)

- As a side issue to the second point, unless you want to implement your own reliable layer on top of UDP (boring, fiddly), it makes sense to have a TCP channel open anyway for reliable transfer of critical information. Textual ATC might fit into this category, and I'm sure there is other meta-info that should be reliably delivered.

H&H
James

--

Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.


_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to