🎉 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!
Windows 98 to Linux porting
I am writing a MUD that uses winsoc32, but the server that is going to host it runs linux (I think redhat). They said that the same code should compile for linux. I was wondering if there was anything special I need to do in order to port my windows code.
www.trak.to/rdp
If use any function that starts with WSA then you can''t use it in Linux. i.e. You need to turn functions like WSAEventSelect and WSAAsyncSelect into straight select statements. In other words it will only transfer transparently if you only use POSIX functions and Berkeley socket functions.
I''ve just finished porting my socket code to Linux just a couple days ago. The only real differences where no WSAStartup or WSACleanup. I did have some trouble using select() though, so I switched to poll().
The thing is, I didn''t use any windows socket classes like CSocket. Wrote my own. Now porting is a snap.
The thing is, I didn''t use any windows socket classes like CSocket. Wrote my own. Now porting is a snap.
There ya go! never write anything that has the dirty stink of "Microsoft Specific", and your code is bound to be more portable! Window management aside, of course.
![](smile.gif)
*oof*
![](smile.gif)
*oof*
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement