sclang: simplify socket implementation and prevent deadlock

Signed-off-by: Tim Blechmann <tim@klingt.org>