🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Multiple Platform Networking API(s)

Started by
4 comments, last by Null and Void 23 years, 3 months ago
Well, I guess the name of the thread kind of points out what I''m looking for. I''m looking for some API that will allow me to use it on different platforms for networking (TCP/IP, UDP/IP, and/or IPX) I looked into OpenPlay, but it is written to make sure that you''re forced to use Code Warrior (they even use "Boolean" instead of "bool"), which I don''t have, and it just starting to become portable to Linux. Anyway, I''m more worried about Linux and Windows than I am about Mac''s (but it is a plus if I could support them as well). Or am I going to have to deal with multiple API''s and/or libraries? Thanks in advance for your help. "Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/
Advertisement
BSD-like functions are (almost) portable between Unix and Windows (you do have to have some wrapper code for Winsock though, but it''s not much).

Apart from that, I''d check out freshmeat for some wrapper libs. And IIRC, the author of SDL made a networking wrapper as well (it probably works on Win, Unix and Mac)

cu,
Prefect

Resist Windows XP''s Invasive Production Activation Technology!
Sanity is the trademark of a weak mind.
Widelands - laid back, free software strategy
Well, I found a couple of promising ones on freshmeat (I hadn''t been to the site before ). I''m going to look in to the ClanLib library first (I can probably use this to get me out of the OpenAL/DirectSound dillema as well, heh), and if that doesn''t work out, I''ll try the SDL_Net one.

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/
quote: Original post by Prefect
BSD-like functions are (almost) portable between Unix and Windows (you do have to have some wrapper code for Winsock though, but it''s not much).

Well, I haven''t given SDL_Net a try yet, but ClanLib is being evil and exiting with a "abnormal program termination" every time right at start up. So, could you elaborate on that please ? I don''t really know what you meant by "BSD-like" functions (I know what BSD is, but I don''t know what you meant when you use it as an adjective, heh).

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/
I was referring to the BSD socket implementation which exists for example on Unix and on Windows - at least more or less; the non-WSAxxx WinSock functions are (almost) exactly like the BSD socket implementation.
This implementation treats every connection as a file (or rather, a pipe), so you can use many file-related commands on them. For more info, try man -S7 socket in Unix.

cu,
Prefect

Resist Windows XP''s Invasive Production Activation Technology!
Sanity is the trademark of a weak mind.
Widelands - laid back, free software strategy
Well, I decided I might as well learn WinSock since the same "ideas" that you need to use it are portable, and because you said that they''re almost the same . I wrote a simple chat client (and server) in it. The first time I wrote it, it took me a while, but the second time through it was pretty easy to do . I decided that if I''m going to support network play in my up coming game that I need to design it from the beginning to be aimed at network play, and not just as an after thought, that''s why I''m trying to get a good networking system set up (at least in my head, if not in code) before hand, and I needed to understand the basics to do that . Anyway...

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/

This topic is closed to new replies.

Advertisement