Beginning of socket utils