@@ -578,28 +578,6 @@ public class HTTPClient {
578
578
return task
579
579
}
580
580
581
- private func resolve( timeout: TimeAmount ? , deadline: NIODeadline ? ) -> TimeAmount ? {
582
- switch ( timeout, deadline) {
583
- case ( . some( let timeout) , . some( let deadline) ) :
584
- return min ( timeout, deadline - . now( ) )
585
- case ( . some( let timeout) , . none) :
586
- return timeout
587
- case ( . none, . some( let deadline) ) :
588
- return deadline - . now( )
589
- case ( . none, . none) :
590
- return nil
591
- }
592
- }
593
-
594
- static func resolveAddress( host: String , port: Int , proxy: Configuration . Proxy ? ) -> ( host: String , port: Int ) {
595
- switch proxy {
596
- case . none:
597
- return ( host, port)
598
- case . some( let proxy) :
599
- return ( proxy. host, proxy. port)
600
- }
601
- }
602
-
603
581
/// `HTTPClient` configuration.
604
582
public struct Configuration {
605
583
/// TLS configuration, defaults to `TLSConfiguration.makeClientConfiguration()`.
@@ -760,19 +738,6 @@ public class HTTPClient {
760
738
public static func delegateAndChannel( on eventLoop: EventLoop ) -> EventLoopPreference {
761
739
return EventLoopPreference ( . delegateAndChannel( on: eventLoop) )
762
740
}
763
-
764
- var bestEventLoop : EventLoop ? {
765
- switch self . preference {
766
- case . delegate( on: let el) :
767
- return el
768
- case . delegateAndChannel( on: let el) :
769
- return el
770
- case . testOnly_exact( channelOn: let el, delegateOn: _) :
771
- return el
772
- case . indifferent:
773
- return nil
774
- }
775
- }
776
741
}
777
742
778
743
/// Specifies decompression settings.
0 commit comments