idTCPServer on peer to peer

hello,
can anyone give me an example of connecting two pc's in the same LAN using idTCPServer
and idTCPClient using indy 10 ?
........
the LAN is configured through a router with NAT and IP address 192.168.1.1
PC-1 has 192.168.1.2
PC-2 has 192.168.1.3
what i want is to connect the two PC`s as client/server
is it possible ? can anyone give a sample ?
i will appreciate any help...
thanks...
toulisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Emmanuel PASQUIERFreelance Project ManagerCommented:
You will find all you need to get started here
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_21040385.html

There are 2 full samples of TCP Client/Server using Indy, and more to get from Indy website
These are command-oriented, meaning you can create easily 'commands' in your server that will be treated with events. For more complex protocols, you would have to treat the TCP/IP flux byte after byte, which is not recommended for a first try at client/server.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.