socket class