× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Mon, 22 Apr 2002, Jim Langston wrote:
>
> The server will have a listener on some port.  In this case telnet port 23.
> A client requests a connection to the server on port 23.  The server
> receives the request and hands the port off to a new thread (usually) which
> establishes the connection on some other port.

This is not true.   A telnet server does not switch you to another port.
Maybe you're getting "socket" and "port" mixed up?  At any rate, there's
only one port for a telnet server -- 23 -- and it does not change after
you connect.

> As far as the client is
> concerned you are connected on the server on port 23, although in the server
> it may see it is port 5123.

No.  The server sees it as port 23.   Maybe you're thinking of the
client's port?   The server's port remains 23.   The client's port was
most likely picked by the OS from the range of unused port numbers, and
given the first one that's available.   Usually, people don't worry about
the client's port, since the client doesn't need to listen for
connections, and you don't need to connect to a client -- since it's the
one that does the connecting.

But, this might be where you're confused.   The client side could be 5123
and the server side 23...  At any rate, they don't change.  Once they're
connected, those numbers are fixed until the connection is closed.

> The client doesn't know, or care, what the real
> port is on the server.  That port switching is all server side and the
> client doesn't see it or even know if it's happening.

No.  Normally there is no port switching.   If there is an unusual
circumstance where port switching needs to occur, then the client
definitely needs to know about it, since it will have to call connect()
again to the new port.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.