added ssl support, fixed a bug in receiving continuation frames.