[jdev] How does transport works ?

Scott Cotton wsc at mindowl.com
Thu Sep 7 21:12:16 CDT 2006


Multiple client connections to a single host/port are certainly possible and

in fact happen all the time.  For example, a web server is usually set up
on port 80 and more than one client can be connected at a time.

The underlying mechanism has nothing to do with jabber, but works something

A server binds a "socket" to a host/port (usually the local host of the
A client connects to to that host/ port and is given a connection.
The client's connection is in fact bound to a (host, port) pair too, but
the host is local to the client.  The allocation of the client's port is
hidden from the client and the client's port number can be almost anything
(usually in the range 1000..65XXX) The communication link may then be
identified by the pair of (clienthost, clientport) (serverhost, server port)

If you look at documentation for sockets (man socket on unix or
look up java.net.Socket and java.net.ServerSocket in the java api
for example), you'll see how this is generally managed programmatically.


On 9/8/06, Samuel Goto <samuelgoto at gmail.com> wrote:
> Hi everyone,
>        I am a jabber developer and I am really excited with the MSN
> transport for the jabber server ! I wrote a component to, to add social
> network in a intant messaging network before, and now I want to write a
> transport, but there is something that I have no idea how transports
> accomplishes.
>        How do they have multiple TCP connections ( for each jabber client
> ) to the MSN server at the same port at the same host ?
>        I mean, let me know if I am right : for each jabber user that wants
> to use the MSN transport, you must somehow connect this jabber user to the
> MSN server, right ? So this implies that you are opening one TCP connection
> from your local jabber server host machine ( actually your component is
> doing this ... ) to the MSN server, right ? How do you do this ? I mean, as
> far as I know, you can't have two (host, server, port) connections, right ?
>        Well, sorry if this is a very dumb question, but I'm having
> problems understanding how transports accomplishes this !
>        Any help is appreciated,
>        Cya, Sam
> --
> f u cn rd ths u cn b a gd prgmr !

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20060908/a63378d8/attachment-0002.htm>

More information about the JDev mailing list