socket: add equal?/2