implement socket class

implement socket class and message class