General Sockets Question

  • Thread starter Thread starter ZorpiedoMan
  • Start date Start date
Z

ZorpiedoMan

I'm new to the world of sockets, and this question is not VB specific:

If multiple clients access the same server on the same port, and the server
is set up to do some async communication, does the server's response back to
all the clients on that port, or just to the one who sent the request?

In other words:

Client One - Request Data From Server (It takes a few seconds for the server
to get the answer)
Client Two - Requests Data From Server (this also takes a couple seconds)

The server, on two asyncy threads is processing both requests.
It gets the results for one of the clients and sends the method back up the
socket it is holding for that client.

(here's the question:)

Do both clients 'see' this result and have to determine if it belongs to
them, or does a socket object somehow encapsulate the communication, so that
only the calling client will get the answer?

Hope this question makes sense and someone knows the answer!

thanks.
 
The response only goes to one connected end point at a time.

Each connection is a new "socket" object.


Matt Evans
--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
 
Hi!

Nope... each connection established is an independent entity. You can use
IPHELPER APIs to verify this (which the netstat utility does on Windows NT).

So, each response will go to the respective client only.
 
Back
Top