Advertisement

winsock alternatives?

Started by December 15, 2005 06:21 PM
4 comments, last by Will F 19 years, 1 month ago
is winsock the only way to do socket programming on windows? i know they have higher level layers that can be used such as enet. but i'm asking because i'd like to stay away from the WSA stuff if it is possible and make it easily portable to linux.
You can use the Linux-like functions out of winsock: socket(), bind(), and friends. You only need to call WSAStartup().

For a header file that isolates some of the differences that are still in the WinSock API, look at the HTTP-GET example; the sock_port files.
enum Bool { True, False, FileNotFound };
Advertisement
try looking at the socket.h file for networking in C\C++ in unix
a link is below for the specifications

http://www.opengroup.org/onlinepubs/007908799/xns/syssocket.h.html
PwebrickDeveloper - Looking for work in gaming industry
RakNet is cross-platform along with the HawkNL stuff.

The FAQ has some answers...;)

you can try this socket library:
http://www.alhem.net/Sockets/index.html
SDL_net is another alternative. If you're planning on porting your game over to linux SDL might be helpful.

This topic is closed to new replies.

Advertisement