Click to See Complete Forum and Search --> : 'Transferring' a socket


Jason Coene
April 1st, 1999, 02:37 PM
I have a simple question. I have a socket hosting a port, call it port 22. Now, when someone connects, can i have them redirected to another port (say 21) hosted by another application but still running on the same address?
If so please can you explain?
Thanks in advance,
Jason

April 1st, 1999, 09:42 PM
Hi.
Possible, but the server can't make redirect the packet from the client.
TCP or UDP on the server side uses this format, (source IP address, port #).
As a result, one server can be accessed by many client.

If you generate some code like conuter, gradually the server can change
port number and the client also change the port # at the same application.
These client and server will work.
But remember, the packet from the client goes to the server through the
port named some number. This is a basic rule. Client and Server must have
same port number.
However, the mutilple host can route the packet to the other host.

Hope for help.
-Masaaki Onishi-