More (still not working) socket stuff implementation