renamed the read_msg method to recv_frame. also added support for receiving the "close" frames.