Client and server in Single program on Same system in C Language

Hi,
I have a question,, can client and server be written in single program which can communicate with each other. They should be able to both send and receive data.
If yes, Please give me the idea..
Thanks & Regards.
[238 byte] By [vni] at [2007-11-20 11:43:59]
# 1 Re: Client and server in Single program on Same system in C Language
Yes it can be.
Hint: Start the program and if there is no program listens in the defined port
then program will run as server.
henky@nok.co.id at 2007-11-9 13:55:50 >