         readIfNeeded0()
     }
 
-    fileprivate func connectSocket(to address: SocketAddress) throws -> Bool {
-        fatalError("this must be overridden by sub class")
-    }
-
-    fileprivate func finishConnectSocket() throws {
-        fatalError("this must be overridden by sub class")
-    }
-
     public final func connect0(to address: SocketAddress, promise: EventLoopPromise<Void>?) {
         assert(eventLoop.inEventLoop)
 

        self.socket = socket
        self.selectableEventLoop = eventLoop
        self.closePromise = eventLoop.newPromise()
        self.pendingWrites = PendingWritesManager(iovecs: eventLoop.iovecs, storageRefs: eventLoop.storageRefs)
        active.store(false)
        self._pipeline = ChannelPipeline(channel: self)
    }

    deinit {
        // We should never have any pending writes left as otherwise we may leak callbacks
        assert(pendingWrites.isEmpty)
    }
}


        }

        // Fail all pending writes and so ensure all pending promises are notified
        self._closed = true
        self.cancelWritesOnClose(error: error)

        becomeInactive0()

