Bugfixes for emulator

The emulator now works with the SmartPoint app. You're able to create
multiple sockets and control each one through both the app and the
command line.