After a server accepts a client connection on a certain port, a new socket is
created on the server on a system managed dynamic port to handle the
connection. Please confirm this.
If so, how can I get the number of the dynamic port in the server (in server
code)? Using LocalEndPoint.Port just returns the original listener port
number.
Thanks,
Jason 5 4000 http://msdn.microsoft.com/library/de...pointtopic.asp
Erick Sgarbi After a server accepts a client connection on a certain port, a new socket is created on the server on a system managed dynamic port to handle the connection. Please confirm this.
If so, how can I get the number of the dynamic port in the server (in server code)? Using LocalEndPoint.Port just returns the original listener port number.
Thanks,
Jason
No, I don't need the client's port number, I need the server's new port
number for that instance socket.
Jason
"er***@csharpbox.com" wrote: http://msdn.microsoft.com/library/de...pointtopic.asp
Erick Sgarbi
After a server accepts a client connection on a certain port, a new socket is created on the server on a system managed dynamic port to handle the connection. Please confirm this.
If so, how can I get the number of the dynamic port in the server (in server code)? Using LocalEndPoint.Port just returns the original listener port number.
Thanks,
Jason
Hi,
"Jason" <Ja***@discussions.microsoft.com> wrote in message
news:6D**********************************@microsof t.com... After a server accepts a client connection on a certain port, a new socket is created on the server on a system managed dynamic port to handle the connection. Please confirm this.
No, that's not true. It creates a new Socket but keeps using the same port.
A TCP server can have multiple client connections to the same port.
HTH,
Greetings If so, how can I get the number of the dynamic port in the server (in server code)? Using LocalEndPoint.Port just returns the original listener port number.
Thanks,
Jason
Well then how does the server (underneath) resolve which socket steam should
recieve incoming packets? I thought this was done by creating the instance
socket on the server with a new port in the system managed dynamic port range.
Thanks,
Jason
"Bart Mermuys" wrote: Hi,
"Jason" <Ja***@discussions.microsoft.com> wrote in message news:6D**********************************@microsof t.com... After a server accepts a client connection on a certain port, a new socket is created on the server on a system managed dynamic port to handle the connection. Please confirm this.
No, that's not true. It creates a new Socket but keeps using the same port. A TCP server can have multiple client connections to the same port.
HTH, Greetings
If so, how can I get the number of the dynamic port in the server (in server code)? Using LocalEndPoint.Port just returns the original listener port number.
Thanks,
Jason
Hi,
"Jason" <Ja***@discussions.microsoft.com> wrote in message
news:C7**********************************@microsof t.com... Well then how does the server (underneath) resolve which socket steam should recieve incoming packets?
When there are multiple connections to the same server ip and server port ,
then either the client's ip or client's port is different or both.
Underneath it not only uses server ip and port but also client ip and port
to resolve the right Socket.
I thought this was done by creating the instance socket on the server with a new port in the system managed dynamic port range.
No, it's not, if you use windows you can use the commandline tool 'netstat'
to see that the _same_ server port is used when you have accepted a number
of connections.
For detailed explaining i can only recommend reading the RFC's about the TCP
protocol.
hth,
Greetings
I thought this was done by creating the instance socket on the server with a new port in the system managed dynamic port range.
Thanks,
Jason
"Bart Mermuys" wrote:
Hi,
"Jason" <Ja***@discussions.microsoft.com> wrote in message news:6D**********************************@microsof t.com... > After a server accepts a client connection on a certain port, a new > socket > is > created on the server on a system managed dynamic port to handle the > connection. Please confirm this.
No, that's not true. It creates a new Socket but keeps using the same port. A TCP server can have multiple client connections to the same port.
HTH, Greetings
> > If so, how can I get the number of the dynamic port in the server (in > server > code)? Using LocalEndPoint.Port just returns the original listener > port > number. > > Thanks, > > Jason This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dana Marcusanu |
last post by:
Yes. I want to write a very small web sniffer that gets data from a
specified port. I already looked at some of the existing ones on Internet,
but they are not in Python (I am trying to learn...
|
by: anketm |
last post by:
I am writing a simple client using UDP sockets.
I am wondering if there is any way to determine what local port a
socket was bound to when bind() is not explicitly called.
This is what my...
|
by: Jason |
last post by:
After a server accepts a client connection on a certain port, a new socket is
created on the server on a system managed dynamic port to handle the
connection. Please confirm this.
If so, how...
|
by: Marc |
last post by:
How could I directly trigger a very simple on localhost and a known port
listening server from my internet browser client? Local host means the
little server would be running on the client machine,...
|
by: Sharon |
last post by:
Hi all,
I've implemented a TCP server using the Socket async methods.
When connecting to the server from 3 instances of hyper terminal,
i've noticed that each of the newly created server sockets,...
|
by: jasonsgeiger |
last post by:
From: "Factor" <jasonsgeiger@gmail.com>
Newsgroups: microsoft.public.in.csharp
Subject: Multiple Clients, One port
Date: Wed, 19 Apr 2006 09:36:02 -0700
I'm been working with sockets for a...
|
by: =?Utf-8?B?Vmlua2k=?= |
last post by:
Hello everyone,
I have this code for TCPListenPort. The code works fine, but my manager is
asking me to establish multiple connections to the same port. How can i
acheive that
below is my...
|
by: Giampaolo Rodola' |
last post by:
Hi there,
since the socket.socket.family attribute has been introduced only in
Python 2.5 and I need to have my application to be backward compatible
with Python 2.3 and 2.4 I'd like to know how...
|
by: kash123 |
last post by:
Hi All,
I have written an application, a part of which, in the application, is a socket server programe accepting connection requests from socket clients.
My server code typically contains,
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |