• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

Network communication in C

Hi, I'm trying to write a simple C program that can communicate on a network (LAN or Internet - I don't care).
i.e. I want to be able to open a network connection to a remote machine on a given port (e.g. 80 TCP) and send/receive data.
Any protocols isn't important to me - I'm happy with the raw data for now.
Any ideas how I might go about this? Any libraries or things that might be useful?
I'd prefer to compile it on linux (with gcc) but I guess it doesn't matter that much if I do it on windows (with Turbo C 2.01).
Thanks in advance.
0
samwaters
Asked:
samwaters
4 Solutions
 
sunnycoderCommented:
The best out there
www.ecst.csuchico.edu/~beej/guide/net/

Using protocols would be easier in the beginning ... raw data would require you to construct packets on your own. The above link has comprehensive information presented in a easy to digest manner ... go through it
0
 
brettmjohnsonCommented:
0
 
fridomCommented:
libcurl is what you want:
http://curl.haxx.se/libcurl/

Regards
Friedrich
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
grg99Commented:
0
 
smpoojaryCommented:
YOu can use socket programming. For this go to the link
http://www.ecst.csuchico.edu/~beej/guide/net/bgnet.pdf
-Mahesh
0
 
sunnycoderCommented:
smpoojary,

That is the same link as I posted !!!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now