Commit 1c39bd22 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2933330b
......@@ -18,7 +18,7 @@
// See https://www.nexedi.com/licensing for rationale and options.
package zeo
// Protocol for exchanging ZEO messages.
// Protocol for exchanged ZEO messages.
// On the wire messages are encoded via either pickles or msgpack.
// Each message is wrapped into packet with be32 header of whole packet size.
// See https://github.com/zopefoundation/ZEO/blob/5.2.1-20-gcb26281d/doc/protocol.rst for details.
......@@ -125,7 +125,7 @@ func pktDecodeZ(pkb *pktBuf) (msg, error) {
return m, err
}
tpkt, ok := xpkt.(pickle.Tuple) // XXX also list? -> Z.asTuple(xpkt)
tpkt, ok := encoding('Z').asTuple(xpkt)
if !ok {
return m, derrf("got %T; expected tuple", xpkt)
}
......
......@@ -200,7 +200,7 @@ type rpc struct {
// rpcExcept represents generic exception
type rpcExcept struct {
exc string
argv []interface{}
argv tuple
}
func (r *rpcExcept) Error() string {
......@@ -282,7 +282,7 @@ func (r rpc) zeo5Error(arg interface{}) error {
//
// nil is returned if arg does not represent an exception.
func (r rpc) zeo4Error(arg interface{}) error {
// XXX check r.zl.encoding == 'Z' before using pickles?
// XXX check r.zl.encoding == 'Z' before using pickles? XXX
// (exc_class, exc_inst), e.g.
// ogórek.Tuple{
......@@ -297,7 +297,7 @@ func (r rpc) zeo4Error(arg interface{}) error {
// }
// }
// }
targ, ok := arg.(pickle.Tuple)
targ, ok := arg.(pickle.Tuple) // XXX -> asTuple
if !ok || len(targ) != 2 {
return nil
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment