Added end() to socket