This commit is contained in:
crusader 2018-03-24 02:32:44 +09:00
parent 0b1486a3bd
commit 170438c0d0
4 changed files with 12 additions and 12 deletions

View File

@ -37,7 +37,7 @@ func (crwch *ClientReadWriteCloseHandlers) ReadResponse(clientCTX client.ClientC
return nil, rErr
}
return codec.NewResponseB(buf)
return codec.NewResponse(buf)
}
func (crwch *ClientReadWriteCloseHandlers) WriteRequest(clientCTX client.ClientContext, codec protocol.ClientCodec, conn interface{}, method string, params []interface{}, id interface{}) error {
@ -47,7 +47,7 @@ func (crwch *ClientReadWriteCloseHandlers) WriteRequest(clientCTX client.ClientC
)
soc := conn.(csc.Socket)
buf, wErr = codec.NewRequestB(method, params, id)
buf, wErr = codec.NewRequest(method, params, id)
if nil != wErr {
return wErr
}

View File

@ -38,7 +38,7 @@ func (crwch *ClientReadWriteCloseHandlers) ReadResponse(clientCTX client.ClientC
return nil, err
}
return codec.NewResponseB(buf)
return codec.NewResponse(buf)
}
func (crwch *ClientReadWriteCloseHandlers) WriteRequest(clientCTX client.ClientContext, codec protocol.ClientCodec, conn interface{}, method string, params []interface{}, id interface{}) error {
@ -48,7 +48,7 @@ func (crwch *ClientReadWriteCloseHandlers) WriteRequest(clientCTX client.ClientC
)
soc := conn.(cwfc.Socket)
buf, wErr = codec.NewRequestB(method, params, id)
buf, wErr = codec.NewRequest(method, params, id)
if nil != wErr {
return wErr
}

View File

@ -26,7 +26,7 @@ func (srwch *ServletReadWriteCloseHandlers) ReadRequest(servletCTX rpc.ServletCo
return nil, rErr
}
return codec.NewRequestB(buf)
return codec.NewRequest(buf)
}
func (srwch *ServletReadWriteCloseHandlers) WriteResponse(servletCTX rpc.ServletContext, conn interface{}, reqCodec protocol.ServerRequestCodec, result interface{}, err error) error {
@ -37,9 +37,9 @@ func (srwch *ServletReadWriteCloseHandlers) WriteResponse(servletCTX rpc.Servlet
soc := conn.(server.Socket)
if nil != err {
buf, wErr = reqCodec.NewErrorB(500, err)
buf, wErr = reqCodec.NewError(500, err)
} else {
buf, wErr = reqCodec.NewResponseB(result)
buf, wErr = reqCodec.NewResponse(result)
}
if nil != wErr {
return wErr
@ -60,7 +60,7 @@ func (srwch *ServletReadWriteCloseHandlers) WriteNotification(servletCTX rpc.Ser
)
soc := conn.(server.Socket)
buf, wErr = codec.NewNotificationB(method, params)
buf, wErr = codec.NewNotification(method, params)
if nil != wErr {
return wErr
}

View File

@ -28,7 +28,7 @@ func (srwch *ServletReadWriteCloseHandlers) ReadRequest(servletCTX rpc.ServletCo
return nil, err
}
return codec.NewRequestB(buf)
return codec.NewRequest(buf)
}
func (srwch *ServletReadWriteCloseHandlers) WriteResponse(servletCTX rpc.ServletContext, conn interface{}, requestCodec protocol.ServerRequestCodec, result interface{}, err error) error {
@ -43,9 +43,9 @@ func (srwch *ServletReadWriteCloseHandlers) WriteResponse(servletCTX rpc.Servlet
soc := conn.(cwf.Socket)
if nil != err {
buf, wErr = requestCodec.NewErrorB(500, err)
buf, wErr = requestCodec.NewError(500, err)
} else {
buf, wErr = requestCodec.NewResponseB(result)
buf, wErr = requestCodec.NewResponse(result)
}
if nil != wErr {
return wErr
@ -69,7 +69,7 @@ func (srwch *ServletReadWriteCloseHandlers) WriteNotification(servletCTX rpc.Ser
)
soc := conn.(cwf.Socket)
buf, wErr = codec.NewNotificationB(method, params)
buf, wErr = codec.NewNotification(method, params)
if nil != wErr {
return wErr
}