That''s the way to do it (class hierarchy). Windows sockets and *nix sockets are technically portable, if you use a minimal amount of features. If you make any attempt to optimize your code for windows (overlapped i/o, event objects, etc...) then you''ll be SoL when you try to convert over. Best bet is to define the basic interface via an abstract base class, and branch off into a win32 class and a *nix class.
And berkley sockets is what you''ll be using on *nix.
🎉 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!
Popular Topics
Advertisement