|
|
|
|
||||||
| comp.protocols.tcp-ip TCP and IP network protocols. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 |
|
Messages: n/a
Hébergeur: |
In article <1147866385.421764.281980@u72g2000cwu.googlegroups .com>,
"shan" <shan.icwa@gmail.com> 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 *** |
|
![]() |
| Outils de la discussion | |
|
|