      //    private var readQueue = WSReadRequest()
     private var currentReadRequest : WSReadRequest?
     
-    private var reader : WSFrameReader
-    
-    public init(_ reader: WSFrameReader)
-    {
-        self.reader = reader
-    }
-    
     /**
      * This method must always be called
      */
-    public func start()
+    public func startReading()
     {
         self.continueReading()
     }

    {
        // kick off the reading of the first frame
        //        Log.debug("Started reading next frame header, State: \(reader.state)")
        self.reader.start { (frame, error) in
            //            Log.debug("Finished reading next frame header, error: \(error), Type: \(frame?.opcode), State: \(self.reader.state)")
            if error == nil && frame != nil {
                // we have the frame so process it and start the next frame
                self.processNewFrame(frame!) {(error) in


    var delegate : WSConnectionDelegate?
    private var frameReader: WSFrameReader
    private var frameWriter: WSFrameWriter

    public var onMessage : MessageCallback?
    public var onClosed : ClosedCallback?
    private var controlFrameBuffer : ReadBufferType = ReadBufferType.alloc(256)
    
    public var transportClosed = false
    
    public init(_ reader: Reader, writer: Writer, _ extensions: [WSExtension])
    {
        self.maxFrameWriteSize = DEFAULT_MAX_FRAME_SIZE
        self.frameReader = WSFrameReader(reader)
        self.frameWriter = WSFrameWriter(writer)

        startReading()
        // So at this point we have a frame reader from which *something* can 
        // consume frames.  So messages (and channels) are a higher level 
        // abstraction on top of frames.  We have a message object from which
