Skip to main content

Porting SocketCC library for Linux to Windows

about two weeks ago i began porting the SocketCC library for Linux and Mac to Windows.
SocketCC is a free C++ class-based library for using sockets and was written between 2001 and 2003 by Jason But.
(You can download the original from the Monash University site here ).
It is a nice small, free and clean library that suited our needs in the company for the project we are doing right now. What some of you hardcore C and C++ programmers wont like though is the fact that is uses Exceptions :)
Alas, SocketCC was not working for windows, so i sat down to
first) make it compileable,
second) get the error codes also under windows,
third) make it runable under windows.
i did not have the time to make it perfect, because our target platform is linux so the windows implementation is sort of a bonus. this meant that i made some hacks and also omitted IPv6 support (some of our extensions we did to the library broke IPv6 functionality for linux as well anyway)
additionally, i needed to use winsock2 and relied on some functionality only present in windowsXP and Vista (and probably win2k3).
even with the hacks it took really some effort making it runable anyway. i will probalby sent my changes to the original author of socketCC at some time in the future.


all of you not knowing the winsock2 library but being interested in windows socket programming in native C/C++, check it out. If you cannot use the Java Framework or (much better) the .NET Framework for your network programming, its the next best thing there is at the moment if you want class based socket programming.
(I dont know about the support in python or stuff though)

i will probalby write some more later info about what i learned for winsock2 and also for SocketCC.


best bytes

Comments