protocol version handling and socket communication

depends on https://github.com/idris-lang/Idris-dev/pull/1452