connecting to a server now works.

the application crashes when disconnecting though...