ServerCallContext.swift 480 B

1234567891011121314151617
  1. import Foundation
  2. import SwiftProtobuf
  3. import NIO
  4. import NIOHTTP1
  5. /// Base class providing data provided to the framework user for all server calls.
  6. open class ServerCallContext {
  7. /// The event loop this call is served on.
  8. public let eventLoop: EventLoop
  9. /// Generic metadata provided with this request.
  10. public let request: HTTPRequestHead
  11. public init(eventLoop: EventLoop, request: HTTPRequestHead) {
  12. self.eventLoop = eventLoop
  13. self.request = request
  14. }
  15. }