From: Jonathan de Boyne Pollard on
>
>
> I am thinking about if someone have 2 pc (or more) and want to play my
> game on both, then he will have to use another port [...]
>
You are not thinking correctly. UDP/IP datagrams have remote as well as
local information.

From: Greg2fs on
I don't understand what you mean, can you explain a bit more ?
From: Preben Friis on
"Greg2fs" <greg2fs(a)gmail.com> wrote:
>I don't understand what you mean, can you explain a bit more ?

I guess he means that one port can listen for an virtually unlimted amount
of clients. You do not need to have one port for each client.

Think of a HTTP server. It only uses port 80 no matter how many machines
connects to it.

From: David Schwartz on
On Feb 21, 2:39 am, Greg2fs <greg...(a)gmail.com> wrote:

> I am developping an online game using a UDP server/client connection,
> I am thinking about if someone have 2 pc (or more) and want to play my
> game on both, then he will have to use another port but how can I make
> my server listening several port ?

Huh? Why would one person with 2 PCs or more be any different from two
people each with one PC?

And what *precisely* do you mean by "use another port"? Since this not
just a different IP address but a different computer entirely, he can
use the same UDP source port. Or are you thinking about NAT? A NAT
device can handle dozens of connections all *to* the same port without
a problem.

DS
From: Greg2fs on
I was thinking about NAT, after some tests it seems that the best
choici is to use the same port for client and server, this way it
seems to work better and there is no upnp.

But suppose that we get the server (1.1.1.1), a client with one pc
(2.2.2.2), the client with two pc (3.3.3.3)
-the first client call the server and the server reply to the same ip/
port there's no problem.
-then the second client call the server with his fist pc and the
server reply the same way... still no problem
-but now the second client call the server with his second pc, will
the server be able to reply has the same ip/port combinason already
exists for the first pc ?