Throw an error if a socket is not open and send method is called #9