Board index » delphi » INDY TCP/IP Client an Server at the same time for the same IP

INDY TCP/IP Client an Server at the same time for the same IP

Hello,

Do we have any possibility to implement Client and Server acting together at
the same time within one application?
The main purpose for my application to acting like Client. But at the same
time I need listen my network for filtering some events. Is it possible to
assigned the same IP address but different ports to the Indy TCP/IP Client
and Server at the same time?

--
Vlad

 

Re:INDY TCP/IP Client an Server at the same time for the same IP


Hi,

yes its possible. Only the combination of port and ip (the socket) needs
to be unique.

enjoy,
Ron.

Re:INDY TCP/IP Client an Server at the same time for the same IP


Hello,

do you mean another network adapter?

Quote
"Ronald Eckersberger" <r...@input.at> wrote in message

news:3BA60B9F.7030504@input.at...
Quote
> Hi,

> yes its possible. Only the combination of port and ip (the socket) needs
> to be unique.

> enjoy,
> Ron.

Re:INDY TCP/IP Client an Server at the same time for the same IP


Hi,

pse see below.

Quote
Vlad Bilousov wrote:
> Hello,

> do you mean another network adapter?

No. Socket: A socket is the combination of an IP address and a port
number. A socket is also a virtual communication conduit between two
processes. Pse, see the excellent introduction to sockets on
http://www.nevrona.com/Indy/Articles.html. Your server needs a unique
combination. The client can connect to any combination.

Quote

> "Ronald Eckersberger" <r...@input.at> wrote in message
> news:3BA60B9F.7030504@input.at...

>>Hi,

>>yes its possible. Only the combination of port and ip (the socket) needs
>>to be unique.

>>enjoy,
>>Ron.

Its possible to use many server and many clients within the same
application.

enjoy,
Ron.

Re:INDY TCP/IP Client an Server at the same time for the same IP


You could even have a server that listens to Port x and client that connects
to port x on the same machine with the same IP, since it is enough if the
client socket has a unique local port (in contrast to the remote port that
doen't have to be unique)...

Andy

Other Threads