Added the server communication functionality. The controller is ready, only device forking needs to be implemented. Also fixed a bug in the socket class.