web server working urgent - TCP-IP

This is a discussion on web server working urgent - TCP-IP ; hi i have a problem see when we connect to any web server then according to http protocol we connect on port 80 so when we connect to server on port 80 it means that a socket is created on ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: web server working urgent

  1. web server working urgent

    hi
    i have a problem
    see when we connect to any web server then according to http protocol
    we connect on port 80 so when we connect to server on port 80 it
    means that a socket is created on server which binds the port 80 with
    let say to a client A Now the communication will be done by this
    socket ( now this port will not used by any other socket) so when any
    other client B will try to connect with the same server how it will
    connect i mean the port is already occupied by this socket.
    may be it is a stupid question but please answer this so that i can
    clear the situation more
    see what i am doing is i have created a server which is listening on
    port 10000 now whenever a client tries to connect it it gets connected

    (opens a socket) so now when any other client B trying to
    connect on same port so is possible that server again get connected to

    client B on this same socket ?????


  2. Re: web server working urgent

    In article <1147866385.421764.281980@u72g2000cwu.googlegroups. com>,
    "shan" wrote:

    > hi
    > i have a problem
    > see when we connect to any web server then according to http protocol
    > we connect on port 80 so when we connect to server on port 80 it
    > means that a socket is created on server which binds the port 80 with
    > let say to a client A Now the communication will be done by this
    > socket ( now this port will not used by any other socket) so when any
    > other client B will try to connect with the same server how it will
    > connect i mean the port is already occupied by this socket.
    > may be it is a stupid question but please answer this so that i can
    > clear the situation more
    > see what i am doing is i have created a server which is listening on
    > port 10000 now whenever a client tries to connect it it gets connected
    >
    > (opens a socket) so now when any other client B trying to
    > connect on same port so is possible that server again get connected to
    >
    > client B on this same socket ?????


    A TCP connection is identified by four pieces of information: local
    address, local port, remote address, and remote port. You can have
    multiple connections with the same local address and port (port 80), but
    they'll each have different remote address and/or remote port, so they
    won't conflict with each other.

    Run "netstat" on your server while multiple clients are connect and
    you'll see all the different connections, each with different values in
    the remote columns.

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

+ Reply to Thread