better split between client and server

remove all client- and server-specific rubbish
sort out the shutdown/close rigmaroll
also handle settings better
create specific classes for client- and server-connections
change an error from runtime to io
more realistic client and server behaviour