Refactorizar Socket.