@@ -55,7 +55,7 @@ public function streaming(): InvokeMode {
5555 private function start () {
5656 $ this ->request ->setHeader ('Lambda-Runtime-Function-Response-Mode ' , 'streaming ' );
5757 $ this ->request ->setHeader ('Transfer-Encoding ' , 'chunked ' );
58- return $ this ->api ->stream ($ this ->request );
58+ return $ this ->api ->conn -> open ($ this ->request );
5959 }
6060
6161 public function transmit ($ source , $ mimeType = null ) {
@@ -103,7 +103,7 @@ public function end() {
103103 if ($ this ->response ) return ; // Already ended
104104
105105 $ this ->stream ?? $ this ->stream = $ this ->start ();
106- $ this ->response = $ this ->api ->finish ($ this ->stream );
106+ $ this ->response = $ this ->api ->conn -> finish ($ this ->stream );
107107 $ this ->response ->closeStream ();
108108 }
109109
@@ -168,26 +168,6 @@ public function request($endpoint) {
168168 return $ request ;
169169 }
170170
171- /**
172- * Starts a stream for a given request
173- *
174- * @param peer.http.HttpRequest
175- * @return peer.http.HttpOutputStream
176- */
177- public function stream ($ request ) {
178- return $ this ->conn ->open ($ request );
179- }
180-
181- /**
182- * Finishes a stream for a given request
183- *
184- * @param peer.http.HttpOutputStream
185- * @return peer.http.HttpResponse
186- */
187- public function finish ($ stream ) {
188- return $ this ->conn ->finish ($ stream );
189- }
190-
191171 /**
192172 * Receives from a given endpoint
193173 *
0 commit comments