How do I go about programming network code in Linux?

Started by
6 comments, last by Running_Wolf 20 years, 6 months ago
The Question says it all. WinSock is for windows but what about Linux?
L.I.G. == Life Is Good
Advertisement
Winsock is surprisingly cross-platform. If you stayed away from the async stuff that ties your code into the Win32 message loop, you should be fine. Maybe have to change a few defines here and there, as well as which headers to include, but nothing that should force you to refactor your entire network code.
SDL has networking support.
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
one word - Posix
Use the posix sockets library. It is probably what winsock is built on anyway. In this lib you find such functions as select(), listen(), bind(), setsockopt(), ioctl(), send(), recv(), etc.

Get the Richard Williams book on sockets programming in Unix.

RandomTask
yes, Winsock is Windows implementation of POSIX sockets.

Proud aedGUI developer.
quote:Original post by RandomTask
Get the Richard Williams book on sockets programming in Unix.


That''s William Richard Stevens or W. Richard Stevens, but you should still get his book
Correct! I seem to have forgotten his name when I wrote that.

RandomTask
quote:Original post by Kwizatz
yes, Winsock is Windows implementation of POSIX sockets.

Proud aedGUI developer.


actually Winsock deviates from the POSIX standard (although it''s still pretty close)


"There is no dark side of the moon really,
As a matter of fact, its all dark."

This topic is closed to new replies.

Advertisement