sockets: added address comparison and socket creation functions