473,385 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

General Sockets Question

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.
Nov 20 '05 #1
2 1401
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.
--------------------
From: "ZorpiedoMan" <js******@dscicorp.com>
Subject: General Sockets Question
Date: Fri, 29 Aug 2003 17:05:27 -0400
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <eD**************@TK2MSFTNGP12.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: ipn36372-c73730.net-resource.net 216.204.100.130
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:132393
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

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 toall 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 serverto 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 thatonly the calling client will get the answer?

Hope this question makes sense and someone knows the answer!

thanks.


Nov 20 '05 #2
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.

--

Regards,
Gaurav Khanna
----------------------------------------------------------------------------
----------------
Microsoft MVP - .NET, MCSE Windows 2000/NT4, MCP+I
WinToolZone - Spelunking Microsoft Technologies
http://www.wintoolzone.com/
"ZorpiedoMan" <js******@dscicorp.com> wrote in message
news:eD**************@TK2MSFTNGP12.phx.gbl...
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.

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: 0to60 | last post by:
I have a question about socket programming in general. Exactly what happens behind the scenes when I one socket connects to a different socket in listen mode? Using the dotnet framework, I...
7
by: Bill English | last post by:
How do I send an object from one computer to another? -- I am a 14 year old C# developer, I am completely self taught, so please don't get mad if I ask a stupid question. Thanks.
2
by: ZorpiedoMan | last post by:
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...
4
by: Sueffel | last post by:
Boy, someday I may get good at this stuff! Until then, I have a "TCP server" that accepts multiple connections. That all works wonderfully! YEAH!!!! I have a TCPClient that is the client...
3
by: derSchweiz | last post by:
Hi, Experimenting with sockets, and I think I got it half working. I have the following code: Private Sub socket_receive(ByVal sender As Object, ByVal e As System.EventArgs) Handles...
2
by: a_agaga | last post by:
Do you know are there some reasons why many do not make processes to communicate through memory? Why network connections (sockets) are used so commonly in IPC (inter process communication)...
0
by: richard.charts | last post by:
Well, unfortunately, I couldn't get any answer on the msdn forums, so I'll give it a shot here. Real question at the bottom....
0
by: rossabri | last post by:
This topic has been addressed in limited detail in other threads: "sockets don't play nice with new style classes :(" May 14 2005....
2
by: =?Utf-8?B?U2Vhbk1hYw==?= | last post by:
I am familiar with how to use winsock in vb6 to create a network app. I'm trying to find a way to take the current vb6 app and create a windows service using system.net.sockets. How do you create...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.