zhuhaow/NEKit

View on GitHub
src/Socket/AdapterSocket/Factory/RejectAdapterFactory.swift

Summary

Maintainability
A
0 mins
Test Coverage
import Foundation

open class RejectAdapterFactory: AdapterFactory {
    public let delay: Int

    public init(delay: Int = Opt.RejectAdapterDefaultDelay) {
        self.delay = delay
    }

    override open func getAdapterFor(session: ConnectSession) -> AdapterSocket {
        return RejectAdapter(delay: delay)
    }
}