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.
You might want to try Tcp4u, it's free any makes socket programming very easy.
http://www.jounin.net/tcp4u.html