some old portable code for win32 & linux sockets, then a class wrapper