Added socket implementation