a simple os independence socket class