I would like to know the simplest and most effective way to open and write data to a socket in the C programming language for network programming.
Much good advice here so far. I generally write in C++, but you can find some use in a white paper I wrote "How to Avoid the Top Ten Sockets Programming Errors" - ignore the advice to use the ACE toolkit (since it requires C++) but take note of the socket errors in the paper - they're easy to make and hard to find, especially for a beginner. http://www.riverace.com/sockets10.htm