server-session-bidistreaming.swift 860 B

12345678910111213141516
  1. {{ access }} protocol {{ .|session:file,service,method }}: ServerSessionBidirectionalStreaming {
  2. /// Receive a message. Blocks until a message is received or the client closes the connection.
  3. func receive() throws -> {{ method|input }}
  4. /// Send a message. Nonblocking.
  5. func send(_ response: {{ method|output }}, completion: ((Bool) -> Void)?) throws
  6. /// Close a connection. Blocks until the connection is closed.
  7. func close() throws
  8. }
  9. fileprivate final class {{ .|session:file,service,method }}Base: ServerSessionBidirectionalStreamingBase<{{ method|input }}, {{ method|output }}>, {{ .|session:file,service,method }} {}
  10. //-{% if generateTestStubs %}
  11. class {{ .|session:file,service,method }}TestStub: ServerSessionBidirectionalStreamingTestStub<{{ method|input }}, {{ method|output }}>, {{ .|session:file,service,method }} {}
  12. //-{% endif %}