   }
 }
 
+
 // Update (Bidirectional Streaming)
-internal final class Echo_EchoUpdateSession : Echo_EchoSession {
+internal protocol Echo_EchoUpdateSession : Echo_EchoSession {
+  /// Receive a message. Blocks until a message is received or the client closes the connection.
+  func receive() throws -> Echo_EchoRequest
+
+  /// Send a message. Nonblocking.
+  func send(_ response: Echo_EchoResponse, completion: @escaping ()->()) throws
+  
+  /// Close a connection. Blocks until the connection is closed.
+  func close() throws
+}
+
+fileprivate final class Echo_EchoUpdateSessionImpl : Echo_EchoSessionImpl, Echo_EchoUpdateSession {
   private var provider : Echo_EchoProvider
 
   /// Create a session.
-  fileprivate init(handler:gRPC.Handler, provider: Echo_EchoProvider) {
+  init(handler:gRPC.Handler, provider: Echo_EchoProvider) {
     self.provider = provider
     super.init(handler:handler)
   }
 
-  /// Receive a message. Blocks until a message is received or the client closes the connection.
-  internal func receive() throws -> Echo_EchoRequest {
+  func receive() throws -> Echo_EchoRequest {
     let sem = DispatchSemaphore(value: 0)
     var requestMessage : Echo_EchoRequest?
     try self.handler.receiveMessage() {(requestData) in

      return self
  }

  /// Call this to wait for a result. Blocking.
  internal func receive() throws -> Echo_EchoResponse {
    var returnError : Echo_EchoClientError?
    var returnResponse : Echo_EchoResponse!
    let sem = DispatchSemaphore(value: 0)
    do {
      try receive() {response, error in
        returnResponse = response
        returnError = error
        sem.signal()
      }
      _ = sem.wait(timeout: DispatchTime.distantFuture)
    }
    if let returnError = returnError {
      throw returnError
    }
    return returnResponse
  }

  /// Call this to wait for a result. Nonblocking.
  internal func receive(completion:@escaping (Echo_EchoResponse?, Echo_EchoClientError?)->()) throws {
    do {
      try call.receiveMessage() {(responseData) in
        if let responseData = responseData {

    }
  }

  internal var timeout : TimeInterval {
    get {
      return self.channel.timeout
