Reworked socket communication