Universal socket library or TCP connecting lib in C

0 Tatrasiel R · September 17, 2015
I am needing a socket lib that can be cross platform in C. So far I keep seeing a bunch of winsock code around but I am wanting to make my program cross platform I.E linux /Windows. 

Any ideas?

Could some one post the lib name and a example please?



Thanks everyone!



Post a Reply

Replies

Oldest  Newest  Rating
0 Tatrasiel R · September 17, 2015
This is a vague answer.  I will have to manage for WSA initialization and cleanup.  I was hoping surely after the past 30 years that we have a cross platform lib for this.
0 c student · September 17, 2015
#ifdef WIN32
#include
#else
#include
...
#endif
  • 1

C

107,176 followers
About

One of the most popular languages of all time.

Links
Moderators
Bucky Roberts Administrator