update for latest micro

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-01-12 17:47:58 +03:00
parent a2939066a5
commit 3829766afd
3 changed files with 17 additions and 5 deletions

View File

@@ -52,6 +52,10 @@ func (h *httpStream) Response() client.Response {
return nil
}
func (h *httpStream) SendMsg(msg interface{}) error {
return h.Send(msg)
}
func (h *httpStream) Send(msg interface{}) error {
h.Lock()
defer h.Unlock()
@@ -69,6 +73,10 @@ func (h *httpStream) Send(msg interface{}) error {
return hreq.Write(h.conn)
}
func (h *httpStream) RecvMsg(msg interface{}) error {
return h.Recv(msg)
}
func (h *httpStream) Recv(msg interface{}) error {
h.Lock()
defer h.Unlock()
@@ -93,6 +101,10 @@ func (h *httpStream) Error() error {
return h.err
}
func (h *httpStream) CloseSend() error {
return h.Close()
}
func (h *httpStream) Close() error {
select {
case <-h.closed: