             guard !closed else {
                 return
             }
-            if let accepted =  try (self.socket as! ServerSocket).accept() {
+            if let accepted =  try self.socket.accept() {
                 do {
                     pipeline.fireChannelRead0(data: try SocketChannel(socket: accepted, eventLoop: group.next() as! SelectableEventLoop))
                 } catch let err {

        return true
    }
    
    fileprivate init(socket: BaseSocket, eventLoop: SelectableEventLoop) {
        self.socket = socket
        self.selectableEventLoop = eventLoop
        self.closePromise = eventLoop.newPromise(type: Void.self)

            guard !closed else {
                return
            }
            if let bytesRead = try buffer.withMutableWritePointer { try self.socket.read(pointer: $0, size: $1) } {
                if bytesRead > 0 {
                    recvAllocator.record(actualReadBytes: bytesRead)

