// Code generated by protoc-gen-go-lite. DO NOT EDIT.
// protoc-gen-go-lite version: v0.11.0
// source: github.com/aperturerobotics/bifrost/signaling/rpc/signaling.proto

package signaling_rpc

import (
	fmt "fmt"
	io "io"
	slices "slices"
	strconv "strconv"
	strings "strings"

	peer "github.com/aperturerobotics/bifrost/peer"
	protobuf_go_lite "github.com/aperturerobotics/protobuf-go-lite"
	json "github.com/aperturerobotics/protobuf-go-lite/json"
)

// ListenRequest is the body of the Listen request.
type ListenRequest struct {
	unknownFields []byte
}

func (x *ListenRequest) Reset() {
	*x = ListenRequest{}
}

func (*ListenRequest) ProtoMessage() {}

// ListenResponse is a message sent in a stream in response to Listen.
type ListenResponse struct {
	unknownFields []byte
	// Body is the body of the response.
	//
	// Types that are assignable to Body:
	//
	//	*ListenResponse_SetPeer
	//	*ListenResponse_ClearPeer
	Body isListenResponse_Body `protobuf_oneof:"body"`
}

func (x *ListenResponse) Reset() {
	*x = ListenResponse{}
}

func (*ListenResponse) ProtoMessage() {}

func (m *ListenResponse) GetBody() isListenResponse_Body {
	if m != nil {
		return m.Body
	}
	return nil
}

func (x *ListenResponse) GetSetPeer() string {
	if x, ok := x.GetBody().(*ListenResponse_SetPeer); ok {
		return x.SetPeer
	}
	return ""
}

func (x *ListenResponse) GetClearPeer() string {
	if x, ok := x.GetBody().(*ListenResponse_ClearPeer); ok {
		return x.ClearPeer
	}
	return ""
}

type isListenResponse_Body interface {
	isListenResponse_Body()
}

type ListenResponse_SetPeer struct {
	// SetPeer marks that a remote peer wants a session.
	// The contents of the string is the encoded peer id of the remote peer.
	SetPeer string `protobuf:"bytes,1,opt,name=set_peer,json=setPeer,proto3,oneof"`
}

type ListenResponse_ClearPeer struct {
	// ClearPeer marks that a remote peer no longer wants a session.
	// The contents of the string is the encoded peer id of the remote peer.
	ClearPeer string `protobuf:"bytes,2,opt,name=clear_peer,json=clearPeer,proto3,oneof"`
}

func (*ListenResponse_SetPeer) isListenResponse_Body() {}

func (*ListenResponse_ClearPeer) isListenResponse_Body() {}

// SessionRequest is a message sent from the client to the server.
type SessionRequest struct {
	unknownFields []byte
	// SessionSeqno is the session sequence number.
	// If this doesn't match the current session no, this pkt will be dropped.
	// This should be zero for the init packet.
	SessionSeqno uint64 `protobuf:"varint,1,opt,name=session_seqno,json=sessionSeqno,proto3" json:"sessionSeqno,omitempty"`
	// Body is the body of the request.
	//
	// Types that are assignable to Body:
	//
	//	*SessionRequest_Init
	//	*SessionRequest_SendMsg
	//	*SessionRequest_ClearMsg
	//	*SessionRequest_AckMsg
	Body isSessionRequest_Body `protobuf_oneof:"body"`
}

func (x *SessionRequest) Reset() {
	*x = SessionRequest{}
}

func (*SessionRequest) ProtoMessage() {}

func (x *SessionRequest) GetSessionSeqno() uint64 {
	if x != nil {
		return x.SessionSeqno
	}
	return 0
}

func (m *SessionRequest) GetBody() isSessionRequest_Body {
	if m != nil {
		return m.Body
	}
	return nil
}

func (x *SessionRequest) GetInit() *SessionInit {
	if x, ok := x.GetBody().(*SessionRequest_Init); ok {
		return x.Init
	}
	return nil
}

func (x *SessionRequest) GetSendMsg() *SessionMsg {
	if x, ok := x.GetBody().(*SessionRequest_SendMsg); ok {
		return x.SendMsg
	}
	return nil
}

func (x *SessionRequest) GetClearMsg() uint64 {
	if x, ok := x.GetBody().(*SessionRequest_ClearMsg); ok {
		return x.ClearMsg
	}
	return 0
}

func (x *SessionRequest) GetAckMsg() uint64 {
	if x, ok := x.GetBody().(*SessionRequest_AckMsg); ok {
		return x.AckMsg
	}
	return 0
}

type isSessionRequest_Body interface {
	isSessionRequest_Body()
}

type SessionRequest_Init struct {
	// Init initializes the session setting which peer to contact.
	Init *SessionInit `protobuf:"bytes,2,opt,name=init,proto3,oneof"`
}

type SessionRequest_SendMsg struct {
	// SendMsg sends a signed message to the remote peer.
	// The server will buffer at most one message for the remote peer at a time.
	// If there is an existing pending outgoing message this will overwrite it.
	// Wait for the message received ack before sending again to avoid overwriting.
	// The signature must match the peer id associated with the rpc session.
	SendMsg *SessionMsg `protobuf:"bytes,3,opt,name=send_msg,json=sendMsg,proto3,oneof"`
}

type SessionRequest_ClearMsg struct {
	// ClearMsg clears a previously sent message from the outbox.
	// If the sequence number does not match, does nothing.
	ClearMsg uint64 `protobuf:"varint,4,opt,name=clear_msg,json=clearMsg,proto3,oneof"`
}

type SessionRequest_AckMsg struct {
	// AckMsg acknowledges that the current incoming message was processed.
	// If the id doesn't match the current incoming message seqno, does nothing.
	AckMsg uint64 `protobuf:"varint,5,opt,name=ack_msg,json=ackMsg,proto3,oneof"`
}

func (*SessionRequest_Init) isSessionRequest_Body() {}

func (*SessionRequest_SendMsg) isSessionRequest_Body() {}

func (*SessionRequest_ClearMsg) isSessionRequest_Body() {}

func (*SessionRequest_AckMsg) isSessionRequest_Body() {}

// SessionInit is a message to init a Session.
type SessionInit struct {
	unknownFields []byte
	// PeerId is the remote peer id we want to contact.
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
}

func (x *SessionInit) Reset() {
	*x = SessionInit{}
}

func (*SessionInit) ProtoMessage() {}

func (x *SessionInit) GetPeerId() string {
	if x != nil {
		return x.PeerId
	}
	return ""
}

// SessionMsg contains a signed message and a sequence number.
type SessionMsg struct {
	unknownFields []byte
	// SignedMsg is the signed message body.
	SignedMsg *peer.SignedMsg `protobuf:"bytes,1,opt,name=signed_msg,json=signedMsg,proto3" json:"signedMsg,omitempty"`
	// Seqno is the message sequence number for clear and ack.
	Seqno uint64 `protobuf:"varint,2,opt,name=seqno,proto3" json:"seqno,omitempty"`
}

func (x *SessionMsg) Reset() {
	*x = SessionMsg{}
}

func (*SessionMsg) ProtoMessage() {}

func (x *SessionMsg) GetSignedMsg() *peer.SignedMsg {
	if x != nil {
		return x.SignedMsg
	}
	return nil
}

func (x *SessionMsg) GetSeqno() uint64 {
	if x != nil {
		return x.Seqno
	}
	return 0
}

// SessionResponse is a message sent from the server to the client.
type SessionResponse struct {
	unknownFields []byte
	// Body is the body of the request.
	//
	// Types that are assignable to Body:
	//
	//	*SessionResponse_Opened
	//	*SessionResponse_Closed
	//	*SessionResponse_RecvMsg
	//	*SessionResponse_ClearMsg
	//	*SessionResponse_AckMsg
	Body isSessionResponse_Body `protobuf_oneof:"body"`
}

func (x *SessionResponse) Reset() {
	*x = SessionResponse{}
}

func (*SessionResponse) ProtoMessage() {}

func (m *SessionResponse) GetBody() isSessionResponse_Body {
	if m != nil {
		return m.Body
	}
	return nil
}

func (x *SessionResponse) GetOpened() uint64 {
	if x, ok := x.GetBody().(*SessionResponse_Opened); ok {
		return x.Opened
	}
	return 0
}

func (x *SessionResponse) GetClosed() bool {
	if x, ok := x.GetBody().(*SessionResponse_Closed); ok {
		return x.Closed
	}
	return false
}

func (x *SessionResponse) GetRecvMsg() *SessionMsg {
	if x, ok := x.GetBody().(*SessionResponse_RecvMsg); ok {
		return x.RecvMsg
	}
	return nil
}

func (x *SessionResponse) GetClearMsg() uint64 {
	if x, ok := x.GetBody().(*SessionResponse_ClearMsg); ok {
		return x.ClearMsg
	}
	return 0
}

func (x *SessionResponse) GetAckMsg() uint64 {
	if x, ok := x.GetBody().(*SessionResponse_AckMsg); ok {
		return x.AckMsg
	}
	return 0
}

type isSessionResponse_Body interface {
	isSessionResponse_Body()
}

type SessionResponse_Opened struct {
	// Opened indicates the connection w/ the remote peer is open.
	// Contains the session nonce, incremented if the peer re-connected.
	// If this increments, re-send the outgoing message.
	Opened uint64 `protobuf:"varint,1,opt,name=opened,proto3,oneof"`
}

type SessionResponse_Closed struct {
	// Closed indicates the connection w/ the remote peer is closed.
	// This is the assumed initial state.
	Closed bool `protobuf:"varint,2,opt,name=closed,proto3,oneof"`
}

type SessionResponse_RecvMsg struct {
	// RecvMsg transfers a message sent by the remote peer.
	// Send ACK once the message has been processed.
	RecvMsg *SessionMsg `protobuf:"bytes,3,opt,name=recv_msg,json=recvMsg,proto3,oneof"`
}

type SessionResponse_ClearMsg struct {
	// ClearMsg clears a message from the remote peer previously sent with recv_msg.
	// This is sent if the remote peer clears their outgoing message before acked.
	ClearMsg uint64 `protobuf:"varint,4,opt,name=clear_msg,json=clearMsg,proto3,oneof"`
}

type SessionResponse_AckMsg struct {
	// AckMsg confirms that the outgoing message was sent and acked.
	AckMsg uint64 `protobuf:"varint,5,opt,name=ack_msg,json=ackMsg,proto3,oneof"`
}

func (*SessionResponse_Opened) isSessionResponse_Body() {}

func (*SessionResponse_Closed) isSessionResponse_Body() {}

func (*SessionResponse_RecvMsg) isSessionResponse_Body() {}

func (*SessionResponse_ClearMsg) isSessionResponse_Body() {}

func (*SessionResponse_AckMsg) isSessionResponse_Body() {}

func (m *ListenRequest) CloneVT() *ListenRequest {
	if m == nil {
		return (*ListenRequest)(nil)
	}
	r := new(ListenRequest)
	if len(m.unknownFields) > 0 {
		r.unknownFields = slices.Clone(m.unknownFields)
	}
	return r
}

func (m *ListenRequest) CloneMessageVT() protobuf_go_lite.CloneMessage {
	return m.CloneVT()
}

func (m *ListenResponse) CloneVT() *ListenResponse {
	if m == nil {
		return (*ListenResponse)(nil)
	}
	r := new(ListenResponse)
	if m.Body != nil {
		r.Body = m.Body.(interface{ CloneOneofVT() isListenResponse_Body }).CloneOneofVT()
	}
	if len(m.unknownFields) > 0 {
		r.unknownFields = slices.Clone(m.unknownFields)
	}
	return r
}

func (m *ListenResponse) CloneMessageVT() protobuf_go_lite.CloneMessage {
	return m.CloneVT()
}

func (m *ListenResponse_SetPeer) CloneVT() *ListenResponse_SetPeer {
	if m == nil {
		return (*ListenResponse_SetPeer)(nil)
	}
	r := new(ListenResponse_SetPeer)
	r.SetPeer = m.SetPeer
	return r
}

func (m *ListenResponse_SetPeer) CloneOneofVT() isListenResponse_Body {
	return m.CloneVT()
}

func (m *ListenResponse_ClearPeer) CloneVT() *ListenResponse_ClearPeer {
	if m == nil {
		return (*ListenResponse_ClearPeer)(nil)
	}
	r := new(ListenResponse_ClearPeer)
	r.ClearPeer = m.ClearPeer
	return r
}

func (m *ListenResponse_ClearPeer) CloneOneofVT() isListenResponse_Body {
	return m.CloneVT()
}

func (m *SessionRequest) CloneVT() *SessionRequest {
	if m == nil {
		return (*SessionRequest)(nil)
	}
	r := new(SessionRequest)
	r.SessionSeqno = m.SessionSeqno
	if m.Body != nil {
		r.Body = m.Body.(interface{ CloneOneofVT() isSessionRequest_Body }).CloneOneofVT()
	}
	if len(m.unknownFields) > 0 {
		r.unknownFields = slices.Clone(m.unknownFields)
	}
	return r
}

func (m *SessionRequest) CloneMessageVT() protobuf_go_lite.CloneMessage {
	return m.CloneVT()
}

func (m *SessionRequest_Init) CloneVT() *SessionRequest_Init {
	if m == nil {
		return (*SessionRequest_Init)(nil)
	}
	r := new(SessionRequest_Init)
	r.Init = m.Init.CloneVT()
	return r
}

func (m *SessionRequest_Init) CloneOneofVT() isSessionRequest_Body {
	return m.CloneVT()
}

func (m *SessionRequest_SendMsg) CloneVT() *SessionRequest_SendMsg {
	if m == nil {
		return (*SessionRequest_SendMsg)(nil)
	}
	r := new(SessionRequest_SendMsg)
	r.SendMsg = m.SendMsg.CloneVT()
	return r
}

func (m *SessionRequest_SendMsg) CloneOneofVT() isSessionRequest_Body {
	return m.CloneVT()
}

func (m *SessionRequest_ClearMsg) CloneVT() *SessionRequest_ClearMsg {
	if m == nil {
		return (*SessionRequest_ClearMsg)(nil)
	}
	r := new(SessionRequest_ClearMsg)
	r.ClearMsg = m.ClearMsg
	return r
}

func (m *SessionRequest_ClearMsg) CloneOneofVT() isSessionRequest_Body {
	return m.CloneVT()
}

func (m *SessionRequest_AckMsg) CloneVT() *SessionRequest_AckMsg {
	if m == nil {
		return (*SessionRequest_AckMsg)(nil)
	}
	r := new(SessionRequest_AckMsg)
	r.AckMsg = m.AckMsg
	return r
}

func (m *SessionRequest_AckMsg) CloneOneofVT() isSessionRequest_Body {
	return m.CloneVT()
}

func (m *SessionInit) CloneVT() *SessionInit {
	if m == nil {
		return (*SessionInit)(nil)
	}
	r := new(SessionInit)
	r.PeerId = m.PeerId
	if len(m.unknownFields) > 0 {
		r.unknownFields = slices.Clone(m.unknownFields)
	}
	return r
}

func (m *SessionInit) CloneMessageVT() protobuf_go_lite.CloneMessage {
	return m.CloneVT()
}

func (m *SessionMsg) CloneVT() *SessionMsg {
	if m == nil {
		return (*SessionMsg)(nil)
	}
	r := new(SessionMsg)
	r.Seqno = m.Seqno
	if rhs := m.SignedMsg; rhs != nil {
		r.SignedMsg = rhs.CloneVT()
	}
	if len(m.unknownFields) > 0 {
		r.unknownFields = slices.Clone(m.unknownFields)
	}
	return r
}

func (m *SessionMsg) CloneMessageVT() protobuf_go_lite.CloneMessage {
	return m.CloneVT()
}

func (m *SessionResponse) CloneVT() *SessionResponse {
	if m == nil {
		return (*SessionResponse)(nil)
	}
	r := new(SessionResponse)
	if m.Body != nil {
		r.Body = m.Body.(interface{ CloneOneofVT() isSessionResponse_Body }).CloneOneofVT()
	}
	if len(m.unknownFields) > 0 {
		r.unknownFields = slices.Clone(m.unknownFields)
	}
	return r
}

func (m *SessionResponse) CloneMessageVT() protobuf_go_lite.CloneMessage {
	return m.CloneVT()
}

func (m *SessionResponse_Opened) CloneVT() *SessionResponse_Opened {
	if m == nil {
		return (*SessionResponse_Opened)(nil)
	}
	r := new(SessionResponse_Opened)
	r.Opened = m.Opened
	return r
}

func (m *SessionResponse_Opened) CloneOneofVT() isSessionResponse_Body {
	return m.CloneVT()
}

func (m *SessionResponse_Closed) CloneVT() *SessionResponse_Closed {
	if m == nil {
		return (*SessionResponse_Closed)(nil)
	}
	r := new(SessionResponse_Closed)
	r.Closed = m.Closed
	return r
}

func (m *SessionResponse_Closed) CloneOneofVT() isSessionResponse_Body {
	return m.CloneVT()
}

func (m *SessionResponse_RecvMsg) CloneVT() *SessionResponse_RecvMsg {
	if m == nil {
		return (*SessionResponse_RecvMsg)(nil)
	}
	r := new(SessionResponse_RecvMsg)
	r.RecvMsg = m.RecvMsg.CloneVT()
	return r
}

func (m *SessionResponse_RecvMsg) CloneOneofVT() isSessionResponse_Body {
	return m.CloneVT()
}

func (m *SessionResponse_ClearMsg) CloneVT() *SessionResponse_ClearMsg {
	if m == nil {
		return (*SessionResponse_ClearMsg)(nil)
	}
	r := new(SessionResponse_ClearMsg)
	r.ClearMsg = m.ClearMsg
	return r
}

func (m *SessionResponse_ClearMsg) CloneOneofVT() isSessionResponse_Body {
	return m.CloneVT()
}

func (m *SessionResponse_AckMsg) CloneVT() *SessionResponse_AckMsg {
	if m == nil {
		return (*SessionResponse_AckMsg)(nil)
	}
	r := new(SessionResponse_AckMsg)
	r.AckMsg = m.AckMsg
	return r
}

func (m *SessionResponse_AckMsg) CloneOneofVT() isSessionResponse_Body {
	return m.CloneVT()
}

func (this *ListenRequest) EqualVT(that *ListenRequest) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *ListenRequest) EqualMessageVT(thatMsg any) bool {
	that, ok := thatMsg.(*ListenRequest)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *ListenResponse) EqualVT(that *ListenResponse) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.Body == nil && that.Body != nil {
		return false
	} else if this.Body != nil {
		if that.Body == nil {
			return false
		}
		if !this.Body.(interface {
			EqualVT(isListenResponse_Body) bool
		}).EqualVT(that.Body) {
			return false
		}
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *ListenResponse) EqualMessageVT(thatMsg any) bool {
	that, ok := thatMsg.(*ListenResponse)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *ListenResponse_SetPeer) EqualVT(thatIface isListenResponse_Body) bool {
	that, ok := thatIface.(*ListenResponse_SetPeer)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if this.SetPeer != that.SetPeer {
		return false
	}
	return true
}

func (this *ListenResponse_ClearPeer) EqualVT(thatIface isListenResponse_Body) bool {
	that, ok := thatIface.(*ListenResponse_ClearPeer)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if this.ClearPeer != that.ClearPeer {
		return false
	}
	return true
}

func (this *SessionRequest) EqualVT(that *SessionRequest) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.Body == nil && that.Body != nil {
		return false
	} else if this.Body != nil {
		if that.Body == nil {
			return false
		}
		if !this.Body.(interface {
			EqualVT(isSessionRequest_Body) bool
		}).EqualVT(that.Body) {
			return false
		}
	}
	if this.SessionSeqno != that.SessionSeqno {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *SessionRequest) EqualMessageVT(thatMsg any) bool {
	that, ok := thatMsg.(*SessionRequest)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *SessionRequest_Init) EqualVT(thatIface isSessionRequest_Body) bool {
	that, ok := thatIface.(*SessionRequest_Init)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if p, q := this.Init, that.Init; p != q {
		if p == nil {
			p = &SessionInit{}
		}
		if q == nil {
			q = &SessionInit{}
		}
		if !p.EqualVT(q) {
			return false
		}
	}
	return true
}

func (this *SessionRequest_SendMsg) EqualVT(thatIface isSessionRequest_Body) bool {
	that, ok := thatIface.(*SessionRequest_SendMsg)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if p, q := this.SendMsg, that.SendMsg; p != q {
		if p == nil {
			p = &SessionMsg{}
		}
		if q == nil {
			q = &SessionMsg{}
		}
		if !p.EqualVT(q) {
			return false
		}
	}
	return true
}

func (this *SessionRequest_ClearMsg) EqualVT(thatIface isSessionRequest_Body) bool {
	that, ok := thatIface.(*SessionRequest_ClearMsg)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if this.ClearMsg != that.ClearMsg {
		return false
	}
	return true
}

func (this *SessionRequest_AckMsg) EqualVT(thatIface isSessionRequest_Body) bool {
	that, ok := thatIface.(*SessionRequest_AckMsg)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if this.AckMsg != that.AckMsg {
		return false
	}
	return true
}

func (this *SessionInit) EqualVT(that *SessionInit) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.PeerId != that.PeerId {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *SessionInit) EqualMessageVT(thatMsg any) bool {
	that, ok := thatMsg.(*SessionInit)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *SessionMsg) EqualVT(that *SessionMsg) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if !this.SignedMsg.EqualVT(that.SignedMsg) {
		return false
	}
	if this.Seqno != that.Seqno {
		return false
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *SessionMsg) EqualMessageVT(thatMsg any) bool {
	that, ok := thatMsg.(*SessionMsg)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *SessionResponse) EqualVT(that *SessionResponse) bool {
	if this == that {
		return true
	} else if this == nil || that == nil {
		return false
	}
	if this.Body == nil && that.Body != nil {
		return false
	} else if this.Body != nil {
		if that.Body == nil {
			return false
		}
		if !this.Body.(interface {
			EqualVT(isSessionResponse_Body) bool
		}).EqualVT(that.Body) {
			return false
		}
	}
	return string(this.unknownFields) == string(that.unknownFields)
}

func (this *SessionResponse) EqualMessageVT(thatMsg any) bool {
	that, ok := thatMsg.(*SessionResponse)
	if !ok {
		return false
	}
	return this.EqualVT(that)
}
func (this *SessionResponse_Opened) EqualVT(thatIface isSessionResponse_Body) bool {
	that, ok := thatIface.(*SessionResponse_Opened)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if this.Opened != that.Opened {
		return false
	}
	return true
}

func (this *SessionResponse_Closed) EqualVT(thatIface isSessionResponse_Body) bool {
	that, ok := thatIface.(*SessionResponse_Closed)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if this.Closed != that.Closed {
		return false
	}
	return true
}

func (this *SessionResponse_RecvMsg) EqualVT(thatIface isSessionResponse_Body) bool {
	that, ok := thatIface.(*SessionResponse_RecvMsg)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if p, q := this.RecvMsg, that.RecvMsg; p != q {
		if p == nil {
			p = &SessionMsg{}
		}
		if q == nil {
			q = &SessionMsg{}
		}
		if !p.EqualVT(q) {
			return false
		}
	}
	return true
}

func (this *SessionResponse_ClearMsg) EqualVT(thatIface isSessionResponse_Body) bool {
	that, ok := thatIface.(*SessionResponse_ClearMsg)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if this.ClearMsg != that.ClearMsg {
		return false
	}
	return true
}

func (this *SessionResponse_AckMsg) EqualVT(thatIface isSessionResponse_Body) bool {
	that, ok := thatIface.(*SessionResponse_AckMsg)
	if !ok {
		return false
	}
	if this == that {
		return true
	}
	if this == nil && that != nil || this != nil && that == nil {
		return false
	}
	if this.AckMsg != that.AckMsg {
		return false
	}
	return true
}

// MarshalProtoJSON marshals the ListenRequest message to JSON.
func (x *ListenRequest) MarshalProtoJSON(s *json.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	s.WriteObjectEnd()
}

// MarshalJSON marshals the ListenRequest to JSON.
func (x *ListenRequest) MarshalJSON() ([]byte, error) {
	return json.DefaultMarshalerConfig.Marshal(x)
}

// UnmarshalProtoJSON unmarshals the ListenRequest message from JSON.
func (x *ListenRequest) UnmarshalProtoJSON(s *json.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		// no fields
	})
}

// UnmarshalJSON unmarshals the ListenRequest from JSON.
func (x *ListenRequest) UnmarshalJSON(b []byte) error {
	return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
}

// MarshalProtoJSON marshals the ListenResponse message to JSON.
func (x *ListenResponse) MarshalProtoJSON(s *json.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.Body != nil {
		switch ov := x.Body.(type) {
		case *ListenResponse_SetPeer:
			s.WriteMoreIf(&wroteField)
			s.WriteObjectField("setPeer")
			s.WriteString(ov.SetPeer)
		case *ListenResponse_ClearPeer:
			s.WriteMoreIf(&wroteField)
			s.WriteObjectField("clearPeer")
			s.WriteString(ov.ClearPeer)
		}
	}
	s.WriteObjectEnd()
}

// MarshalJSON marshals the ListenResponse to JSON.
func (x *ListenResponse) MarshalJSON() ([]byte, error) {
	return json.DefaultMarshalerConfig.Marshal(x)
}

// UnmarshalProtoJSON unmarshals the ListenResponse message from JSON.
func (x *ListenResponse) UnmarshalProtoJSON(s *json.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.Skip() // ignore unknown field
		case "set_peer", "setPeer":
			s.AddField("set_peer")
			ov := &ListenResponse_SetPeer{}
			x.Body = ov
			ov.SetPeer = s.ReadString()
		case "clear_peer", "clearPeer":
			s.AddField("clear_peer")
			ov := &ListenResponse_ClearPeer{}
			x.Body = ov
			ov.ClearPeer = s.ReadString()
		}
	})
}

// UnmarshalJSON unmarshals the ListenResponse from JSON.
func (x *ListenResponse) UnmarshalJSON(b []byte) error {
	return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
}

// MarshalProtoJSON marshals the SessionRequest message to JSON.
func (x *SessionRequest) MarshalProtoJSON(s *json.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.SessionSeqno != 0 || s.HasField("sessionSeqno") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("sessionSeqno")
		s.WriteUint64(x.SessionSeqno)
	}
	if x.Body != nil {
		switch ov := x.Body.(type) {
		case *SessionRequest_Init:
			s.WriteMoreIf(&wroteField)
			s.WriteObjectField("init")
			ov.Init.MarshalProtoJSON(s.WithField("init"))
		case *SessionRequest_SendMsg:
			s.WriteMoreIf(&wroteField)
			s.WriteObjectField("sendMsg")
			ov.SendMsg.MarshalProtoJSON(s.WithField("sendMsg"))
		case *SessionRequest_ClearMsg:
			s.WriteMoreIf(&wroteField)
			s.WriteObjectField("clearMsg")
			s.WriteUint64(ov.ClearMsg)
		case *SessionRequest_AckMsg:
			s.WriteMoreIf(&wroteField)
			s.WriteObjectField("ackMsg")
			s.WriteUint64(ov.AckMsg)
		}
	}
	s.WriteObjectEnd()
}

// MarshalJSON marshals the SessionRequest to JSON.
func (x *SessionRequest) MarshalJSON() ([]byte, error) {
	return json.DefaultMarshalerConfig.Marshal(x)
}

// UnmarshalProtoJSON unmarshals the SessionRequest message from JSON.
func (x *SessionRequest) UnmarshalProtoJSON(s *json.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.Skip() // ignore unknown field
		case "session_seqno", "sessionSeqno":
			s.AddField("session_seqno")
			x.SessionSeqno = s.ReadUint64()
		case "init":
			ov := &SessionRequest_Init{}
			x.Body = ov
			if s.ReadNil() {
				ov.Init = nil
				return
			}
			ov.Init = &SessionInit{}
			ov.Init.UnmarshalProtoJSON(s.WithField("init", true))
		case "send_msg", "sendMsg":
			ov := &SessionRequest_SendMsg{}
			x.Body = ov
			if s.ReadNil() {
				ov.SendMsg = nil
				return
			}
			ov.SendMsg = &SessionMsg{}
			ov.SendMsg.UnmarshalProtoJSON(s.WithField("send_msg", true))
		case "clear_msg", "clearMsg":
			s.AddField("clear_msg")
			ov := &SessionRequest_ClearMsg{}
			x.Body = ov
			ov.ClearMsg = s.ReadUint64()
		case "ack_msg", "ackMsg":
			s.AddField("ack_msg")
			ov := &SessionRequest_AckMsg{}
			x.Body = ov
			ov.AckMsg = s.ReadUint64()
		}
	})
}

// UnmarshalJSON unmarshals the SessionRequest from JSON.
func (x *SessionRequest) UnmarshalJSON(b []byte) error {
	return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
}

// MarshalProtoJSON marshals the SessionInit message to JSON.
func (x *SessionInit) MarshalProtoJSON(s *json.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.PeerId != "" || s.HasField("peerId") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("peerId")
		s.WriteString(x.PeerId)
	}
	s.WriteObjectEnd()
}

// MarshalJSON marshals the SessionInit to JSON.
func (x *SessionInit) MarshalJSON() ([]byte, error) {
	return json.DefaultMarshalerConfig.Marshal(x)
}

// UnmarshalProtoJSON unmarshals the SessionInit message from JSON.
func (x *SessionInit) UnmarshalProtoJSON(s *json.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.Skip() // ignore unknown field
		case "peer_id", "peerId":
			s.AddField("peer_id")
			x.PeerId = s.ReadString()
		}
	})
}

// UnmarshalJSON unmarshals the SessionInit from JSON.
func (x *SessionInit) UnmarshalJSON(b []byte) error {
	return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
}

// MarshalProtoJSON marshals the SessionMsg message to JSON.
func (x *SessionMsg) MarshalProtoJSON(s *json.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.SignedMsg != nil || s.HasField("signedMsg") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("signedMsg")
		x.SignedMsg.MarshalProtoJSON(s.WithField("signedMsg"))
	}
	if x.Seqno != 0 || s.HasField("seqno") {
		s.WriteMoreIf(&wroteField)
		s.WriteObjectField("seqno")
		s.WriteUint64(x.Seqno)
	}
	s.WriteObjectEnd()
}

// MarshalJSON marshals the SessionMsg to JSON.
func (x *SessionMsg) MarshalJSON() ([]byte, error) {
	return json.DefaultMarshalerConfig.Marshal(x)
}

// UnmarshalProtoJSON unmarshals the SessionMsg message from JSON.
func (x *SessionMsg) UnmarshalProtoJSON(s *json.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.Skip() // ignore unknown field
		case "signed_msg", "signedMsg":
			if s.ReadNil() {
				x.SignedMsg = nil
				return
			}
			x.SignedMsg = &peer.SignedMsg{}
			x.SignedMsg.UnmarshalProtoJSON(s.WithField("signed_msg", true))
		case "seqno":
			s.AddField("seqno")
			x.Seqno = s.ReadUint64()
		}
	})
}

// UnmarshalJSON unmarshals the SessionMsg from JSON.
func (x *SessionMsg) UnmarshalJSON(b []byte) error {
	return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
}

// MarshalProtoJSON marshals the SessionResponse message to JSON.
func (x *SessionResponse) MarshalProtoJSON(s *json.MarshalState) {
	if x == nil {
		s.WriteNil()
		return
	}
	s.WriteObjectStart()
	var wroteField bool
	if x.Body != nil {
		switch ov := x.Body.(type) {
		case *SessionResponse_Opened:
			s.WriteMoreIf(&wroteField)
			s.WriteObjectField("opened")
			s.WriteUint64(ov.Opened)
		case *SessionResponse_Closed:
			s.WriteMoreIf(&wroteField)
			s.WriteObjectField("closed")
			s.WriteBool(ov.Closed)
		case *SessionResponse_RecvMsg:
			s.WriteMoreIf(&wroteField)
			s.WriteObjectField("recvMsg")
			ov.RecvMsg.MarshalProtoJSON(s.WithField("recvMsg"))
		case *SessionResponse_ClearMsg:
			s.WriteMoreIf(&wroteField)
			s.WriteObjectField("clearMsg")
			s.WriteUint64(ov.ClearMsg)
		case *SessionResponse_AckMsg:
			s.WriteMoreIf(&wroteField)
			s.WriteObjectField("ackMsg")
			s.WriteUint64(ov.AckMsg)
		}
	}
	s.WriteObjectEnd()
}

// MarshalJSON marshals the SessionResponse to JSON.
func (x *SessionResponse) MarshalJSON() ([]byte, error) {
	return json.DefaultMarshalerConfig.Marshal(x)
}

// UnmarshalProtoJSON unmarshals the SessionResponse message from JSON.
func (x *SessionResponse) UnmarshalProtoJSON(s *json.UnmarshalState) {
	if s.ReadNil() {
		return
	}
	s.ReadObject(func(key string) {
		switch key {
		default:
			s.Skip() // ignore unknown field
		case "opened":
			s.AddField("opened")
			ov := &SessionResponse_Opened{}
			x.Body = ov
			ov.Opened = s.ReadUint64()
		case "closed":
			s.AddField("closed")
			ov := &SessionResponse_Closed{}
			x.Body = ov
			ov.Closed = s.ReadBool()
		case "recv_msg", "recvMsg":
			ov := &SessionResponse_RecvMsg{}
			x.Body = ov
			if s.ReadNil() {
				ov.RecvMsg = nil
				return
			}
			ov.RecvMsg = &SessionMsg{}
			ov.RecvMsg.UnmarshalProtoJSON(s.WithField("recv_msg", true))
		case "clear_msg", "clearMsg":
			s.AddField("clear_msg")
			ov := &SessionResponse_ClearMsg{}
			x.Body = ov
			ov.ClearMsg = s.ReadUint64()
		case "ack_msg", "ackMsg":
			s.AddField("ack_msg")
			ov := &SessionResponse_AckMsg{}
			x.Body = ov
			ov.AckMsg = s.ReadUint64()
		}
	})
}

// UnmarshalJSON unmarshals the SessionResponse from JSON.
func (x *SessionResponse) UnmarshalJSON(b []byte) error {
	return json.DefaultUnmarshalerConfig.Unmarshal(b, x)
}

func (m *ListenRequest) MarshalVT() (dAtA []byte, err error) {
	if m == nil {
		return nil, nil
	}
	size := m.SizeVT()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *ListenRequest) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *ListenRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	if m == nil {
		return 0, nil
	}
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.unknownFields != nil {
		i -= len(m.unknownFields)
		copy(dAtA[i:], m.unknownFields)
	}
	return len(dAtA) - i, nil
}

func (m *ListenResponse) MarshalVT() (dAtA []byte, err error) {
	if m == nil {
		return nil, nil
	}
	size := m.SizeVT()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *ListenResponse) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *ListenResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	if m == nil {
		return 0, nil
	}
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.unknownFields != nil {
		i -= len(m.unknownFields)
		copy(dAtA[i:], m.unknownFields)
	}
	if vtmsg, ok := m.Body.(interface {
		MarshalToSizedBufferVT([]byte) (int, error)
	}); ok {
		size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
	}
	return len(dAtA) - i, nil
}

func (m *ListenResponse_SetPeer) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *ListenResponse_SetPeer) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	i := len(dAtA)
	i -= len(m.SetPeer)
	copy(dAtA[i:], m.SetPeer)
	i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(len(m.SetPeer)))
	i--
	dAtA[i] = 0xa
	return len(dAtA) - i, nil
}
func (m *ListenResponse_ClearPeer) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *ListenResponse_ClearPeer) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	i := len(dAtA)
	i -= len(m.ClearPeer)
	copy(dAtA[i:], m.ClearPeer)
	i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(len(m.ClearPeer)))
	i--
	dAtA[i] = 0x12
	return len(dAtA) - i, nil
}
func (m *SessionRequest) MarshalVT() (dAtA []byte, err error) {
	if m == nil {
		return nil, nil
	}
	size := m.SizeVT()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *SessionRequest) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	if m == nil {
		return 0, nil
	}
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.unknownFields != nil {
		i -= len(m.unknownFields)
		copy(dAtA[i:], m.unknownFields)
	}
	if vtmsg, ok := m.Body.(interface {
		MarshalToSizedBufferVT([]byte) (int, error)
	}); ok {
		size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
	}
	if m.SessionSeqno != 0 {
		i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.SessionSeqno))
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func (m *SessionRequest_Init) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionRequest_Init) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.Init != nil {
		size, err := m.Init.MarshalToSizedBufferVT(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x12
	} else {
		i = protobuf_go_lite.EncodeVarint(dAtA, i, 0)
		i--
		dAtA[i] = 0x12
	}
	return len(dAtA) - i, nil
}
func (m *SessionRequest_SendMsg) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionRequest_SendMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.SendMsg != nil {
		size, err := m.SendMsg.MarshalToSizedBufferVT(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x1a
	} else {
		i = protobuf_go_lite.EncodeVarint(dAtA, i, 0)
		i--
		dAtA[i] = 0x1a
	}
	return len(dAtA) - i, nil
}
func (m *SessionRequest_ClearMsg) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionRequest_ClearMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	i := len(dAtA)
	i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.ClearMsg))
	i--
	dAtA[i] = 0x20
	return len(dAtA) - i, nil
}
func (m *SessionRequest_AckMsg) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionRequest_AckMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	i := len(dAtA)
	i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.AckMsg))
	i--
	dAtA[i] = 0x28
	return len(dAtA) - i, nil
}
func (m *SessionInit) MarshalVT() (dAtA []byte, err error) {
	if m == nil {
		return nil, nil
	}
	size := m.SizeVT()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *SessionInit) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionInit) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	if m == nil {
		return 0, nil
	}
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.unknownFields != nil {
		i -= len(m.unknownFields)
		copy(dAtA[i:], m.unknownFields)
	}
	if len(m.PeerId) > 0 {
		i -= len(m.PeerId)
		copy(dAtA[i:], m.PeerId)
		i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(len(m.PeerId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *SessionMsg) MarshalVT() (dAtA []byte, err error) {
	if m == nil {
		return nil, nil
	}
	size := m.SizeVT()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *SessionMsg) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	if m == nil {
		return 0, nil
	}
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.unknownFields != nil {
		i -= len(m.unknownFields)
		copy(dAtA[i:], m.unknownFields)
	}
	if m.Seqno != 0 {
		i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.Seqno))
		i--
		dAtA[i] = 0x10
	}
	if m.SignedMsg != nil {
		size, err := m.SignedMsg.MarshalToSizedBufferVT(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *SessionResponse) MarshalVT() (dAtA []byte, err error) {
	if m == nil {
		return nil, nil
	}
	size := m.SizeVT()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBufferVT(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *SessionResponse) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	if m == nil {
		return 0, nil
	}
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.unknownFields != nil {
		i -= len(m.unknownFields)
		copy(dAtA[i:], m.unknownFields)
	}
	if vtmsg, ok := m.Body.(interface {
		MarshalToSizedBufferVT([]byte) (int, error)
	}); ok {
		size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
	}
	return len(dAtA) - i, nil
}

func (m *SessionResponse_Opened) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionResponse_Opened) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	i := len(dAtA)
	i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.Opened))
	i--
	dAtA[i] = 0x8
	return len(dAtA) - i, nil
}
func (m *SessionResponse_Closed) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionResponse_Closed) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	i := len(dAtA)
	i--
	if m.Closed {
		dAtA[i] = 1
	} else {
		dAtA[i] = 0
	}
	i--
	dAtA[i] = 0x10
	return len(dAtA) - i, nil
}
func (m *SessionResponse_RecvMsg) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionResponse_RecvMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	i := len(dAtA)
	if m.RecvMsg != nil {
		size, err := m.RecvMsg.MarshalToSizedBufferVT(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size))
		i--
		dAtA[i] = 0x1a
	} else {
		i = protobuf_go_lite.EncodeVarint(dAtA, i, 0)
		i--
		dAtA[i] = 0x1a
	}
	return len(dAtA) - i, nil
}
func (m *SessionResponse_ClearMsg) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionResponse_ClearMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	i := len(dAtA)
	i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.ClearMsg))
	i--
	dAtA[i] = 0x20
	return len(dAtA) - i, nil
}
func (m *SessionResponse_AckMsg) MarshalToVT(dAtA []byte) (int, error) {
	size := m.SizeVT()
	return m.MarshalToSizedBufferVT(dAtA[:size])
}

func (m *SessionResponse_AckMsg) MarshalToSizedBufferVT(dAtA []byte) (int, error) {
	i := len(dAtA)
	i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(m.AckMsg))
	i--
	dAtA[i] = 0x28
	return len(dAtA) - i, nil
}
func (m *ListenRequest) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	n += len(m.unknownFields)
	return n
}

func (m *ListenResponse) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if vtmsg, ok := m.Body.(interface{ SizeVT() int }); ok {
		n += vtmsg.SizeVT()
	}
	n += len(m.unknownFields)
	return n
}

func (m *ListenResponse_SetPeer) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.SetPeer)
	n += 1 + l + protobuf_go_lite.SizeOfVarint(uint64(l))
	return n
}
func (m *ListenResponse_ClearPeer) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ClearPeer)
	n += 1 + l + protobuf_go_lite.SizeOfVarint(uint64(l))
	return n
}
func (m *SessionRequest) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.SessionSeqno != 0 {
		n += 1 + protobuf_go_lite.SizeOfVarint(uint64(m.SessionSeqno))
	}
	if vtmsg, ok := m.Body.(interface{ SizeVT() int }); ok {
		n += vtmsg.SizeVT()
	}
	n += len(m.unknownFields)
	return n
}

func (m *SessionRequest_Init) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Init != nil {
		l = m.Init.SizeVT()
		n += 1 + l + protobuf_go_lite.SizeOfVarint(uint64(l))
	} else {
		n += 2
	}
	return n
}
func (m *SessionRequest_SendMsg) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.SendMsg != nil {
		l = m.SendMsg.SizeVT()
		n += 1 + l + protobuf_go_lite.SizeOfVarint(uint64(l))
	} else {
		n += 2
	}
	return n
}
func (m *SessionRequest_ClearMsg) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	n += 1 + protobuf_go_lite.SizeOfVarint(uint64(m.ClearMsg))
	return n
}
func (m *SessionRequest_AckMsg) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	n += 1 + protobuf_go_lite.SizeOfVarint(uint64(m.AckMsg))
	return n
}
func (m *SessionInit) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.PeerId)
	if l > 0 {
		n += 1 + l + protobuf_go_lite.SizeOfVarint(uint64(l))
	}
	n += len(m.unknownFields)
	return n
}

func (m *SessionMsg) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.SignedMsg != nil {
		l = m.SignedMsg.SizeVT()
		n += 1 + l + protobuf_go_lite.SizeOfVarint(uint64(l))
	}
	if m.Seqno != 0 {
		n += 1 + protobuf_go_lite.SizeOfVarint(uint64(m.Seqno))
	}
	n += len(m.unknownFields)
	return n
}

func (m *SessionResponse) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if vtmsg, ok := m.Body.(interface{ SizeVT() int }); ok {
		n += vtmsg.SizeVT()
	}
	n += len(m.unknownFields)
	return n
}

func (m *SessionResponse_Opened) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	n += 1 + protobuf_go_lite.SizeOfVarint(uint64(m.Opened))
	return n
}
func (m *SessionResponse_Closed) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	n += 2
	return n
}
func (m *SessionResponse_RecvMsg) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.RecvMsg != nil {
		l = m.RecvMsg.SizeVT()
		n += 1 + l + protobuf_go_lite.SizeOfVarint(uint64(l))
	} else {
		n += 2
	}
	return n
}
func (m *SessionResponse_ClearMsg) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	n += 1 + protobuf_go_lite.SizeOfVarint(uint64(m.ClearMsg))
	return n
}
func (m *SessionResponse_AckMsg) SizeVT() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	n += 1 + protobuf_go_lite.SizeOfVarint(uint64(m.AckMsg))
	return n
}
func (x *ListenRequest) MarshalProtoText() string {
	var sb strings.Builder
	sb.WriteString("ListenRequest {")
	sb.WriteString("}")
	return sb.String()
}

func (x *ListenRequest) String() string {
	return x.MarshalProtoText()
}
func (x *ListenResponse) MarshalProtoText() string {
	var sb strings.Builder
	sb.WriteString("ListenResponse {")
	switch body := x.Body.(type) {
	case *ListenResponse_SetPeer:
		if body.SetPeer != "" {
			if sb.Len() > 16 {
				sb.WriteString(" ")
			}
			sb.WriteString("set_peer: ")
			sb.WriteString(strconv.Quote(body.SetPeer))
		}
	case *ListenResponse_ClearPeer:
		if body.ClearPeer != "" {
			if sb.Len() > 16 {
				sb.WriteString(" ")
			}
			sb.WriteString("clear_peer: ")
			sb.WriteString(strconv.Quote(body.ClearPeer))
		}
	}
	sb.WriteString("}")
	return sb.String()
}

func (x *ListenResponse) String() string {
	return x.MarshalProtoText()
}
func (x *SessionRequest) MarshalProtoText() string {
	var sb strings.Builder
	sb.WriteString("SessionRequest {")
	if x.SessionSeqno != 0 {
		if sb.Len() > 16 {
			sb.WriteString(" ")
		}
		sb.WriteString("session_seqno: ")
		sb.WriteString(strconv.FormatUint(uint64(x.SessionSeqno), 10))
	}
	switch body := x.Body.(type) {
	case *SessionRequest_Init:
		if body.Init != nil {
			if sb.Len() > 16 {
				sb.WriteString(" ")
			}
			sb.WriteString("init: ")
			sb.WriteString(body.Init.MarshalProtoText())
		}
	case *SessionRequest_SendMsg:
		if body.SendMsg != nil {
			if sb.Len() > 16 {
				sb.WriteString(" ")
			}
			sb.WriteString("send_msg: ")
			sb.WriteString(body.SendMsg.MarshalProtoText())
		}
	case *SessionRequest_ClearMsg:
		if body.ClearMsg != 0 {
			if sb.Len() > 16 {
				sb.WriteString(" ")
			}
			sb.WriteString("clear_msg: ")
			sb.WriteString(strconv.FormatUint(uint64(body.ClearMsg), 10))
		}
	case *SessionRequest_AckMsg:
		if body.AckMsg != 0 {
			if sb.Len() > 16 {
				sb.WriteString(" ")
			}
			sb.WriteString("ack_msg: ")
			sb.WriteString(strconv.FormatUint(uint64(body.AckMsg), 10))
		}
	}
	sb.WriteString("}")
	return sb.String()
}

func (x *SessionRequest) String() string {
	return x.MarshalProtoText()
}
func (x *SessionInit) MarshalProtoText() string {
	var sb strings.Builder
	sb.WriteString("SessionInit {")
	if x.PeerId != "" {
		if sb.Len() > 13 {
			sb.WriteString(" ")
		}
		sb.WriteString("peer_id: ")
		sb.WriteString(strconv.Quote(x.PeerId))
	}
	sb.WriteString("}")
	return sb.String()
}

func (x *SessionInit) String() string {
	return x.MarshalProtoText()
}
func (x *SessionMsg) MarshalProtoText() string {
	var sb strings.Builder
	sb.WriteString("SessionMsg {")
	if x.SignedMsg != nil {
		if sb.Len() > 12 {
			sb.WriteString(" ")
		}
		sb.WriteString("signed_msg: ")
		sb.WriteString(x.SignedMsg.MarshalProtoText())
	}
	if x.Seqno != 0 {
		if sb.Len() > 12 {
			sb.WriteString(" ")
		}
		sb.WriteString("seqno: ")
		sb.WriteString(strconv.FormatUint(uint64(x.Seqno), 10))
	}
	sb.WriteString("}")
	return sb.String()
}

func (x *SessionMsg) String() string {
	return x.MarshalProtoText()
}
func (x *SessionResponse) MarshalProtoText() string {
	var sb strings.Builder
	sb.WriteString("SessionResponse {")
	switch body := x.Body.(type) {
	case *SessionResponse_Opened:
		if body.Opened != 0 {
			if sb.Len() > 17 {
				sb.WriteString(" ")
			}
			sb.WriteString("opened: ")
			sb.WriteString(strconv.FormatUint(uint64(body.Opened), 10))
		}
	case *SessionResponse_Closed:
		if body.Closed != false {
			if sb.Len() > 17 {
				sb.WriteString(" ")
			}
			sb.WriteString("closed: ")
			sb.WriteString(strconv.FormatBool(body.Closed))
		}
	case *SessionResponse_RecvMsg:
		if body.RecvMsg != nil {
			if sb.Len() > 17 {
				sb.WriteString(" ")
			}
			sb.WriteString("recv_msg: ")
			sb.WriteString(body.RecvMsg.MarshalProtoText())
		}
	case *SessionResponse_ClearMsg:
		if body.ClearMsg != 0 {
			if sb.Len() > 17 {
				sb.WriteString(" ")
			}
			sb.WriteString("clear_msg: ")
			sb.WriteString(strconv.FormatUint(uint64(body.ClearMsg), 10))
		}
	case *SessionResponse_AckMsg:
		if body.AckMsg != 0 {
			if sb.Len() > 17 {
				sb.WriteString(" ")
			}
			sb.WriteString("ack_msg: ")
			sb.WriteString(strconv.FormatUint(uint64(body.AckMsg), 10))
		}
	}
	sb.WriteString("}")
	return sb.String()
}

func (x *SessionResponse) String() string {
	return x.MarshalProtoText()
}
func (m *ListenRequest) UnmarshalVT(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return protobuf_go_lite.ErrIntOverflow
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: ListenRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: ListenRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		default:
			iNdEx = preIndex
			skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *ListenResponse) UnmarshalVT(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return protobuf_go_lite.ErrIntOverflow
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: ListenResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: ListenResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SetPeer", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Body = &ListenResponse_SetPeer{SetPeer: string(dAtA[iNdEx:postIndex])}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClearPeer", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Body = &ListenResponse_ClearPeer{ClearPeer: string(dAtA[iNdEx:postIndex])}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *SessionRequest) UnmarshalVT(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return protobuf_go_lite.ErrIntOverflow
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: SessionRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: SessionRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field SessionSeqno", wireType)
			}
			m.SessionSeqno = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.SessionSeqno |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Init", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if oneof, ok := m.Body.(*SessionRequest_Init); ok {
				if err := oneof.Init.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
					return err
				}
			} else {
				v := &SessionInit{}
				if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
					return err
				}
				m.Body = &SessionRequest_Init{Init: v}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SendMsg", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if oneof, ok := m.Body.(*SessionRequest_SendMsg); ok {
				if err := oneof.SendMsg.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
					return err
				}
			} else {
				v := &SessionMsg{}
				if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
					return err
				}
				m.Body = &SessionRequest_SendMsg{SendMsg: v}
			}
			iNdEx = postIndex
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClearMsg", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Body = &SessionRequest_ClearMsg{ClearMsg: v}
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field AckMsg", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Body = &SessionRequest_AckMsg{AckMsg: v}
		default:
			iNdEx = preIndex
			skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *SessionInit) UnmarshalVT(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return protobuf_go_lite.ErrIntOverflow
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: SessionInit: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: SessionInit: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.PeerId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *SessionMsg) UnmarshalVT(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return protobuf_go_lite.ErrIntOverflow
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: SessionMsg: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: SessionMsg: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SignedMsg", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.SignedMsg == nil {
				m.SignedMsg = &peer.SignedMsg{}
			}
			if err := m.SignedMsg.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Seqno", wireType)
			}
			m.Seqno = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Seqno |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *SessionResponse) UnmarshalVT(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return protobuf_go_lite.ErrIntOverflow
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: SessionResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: SessionResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Opened", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Body = &SessionResponse_Opened{Opened: v}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Closed", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			b := bool(v != 0)
			m.Body = &SessionResponse_Closed{Closed: b}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RecvMsg", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if oneof, ok := m.Body.(*SessionResponse_RecvMsg); ok {
				if err := oneof.RecvMsg.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
					return err
				}
			} else {
				v := &SessionMsg{}
				if err := v.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil {
					return err
				}
				m.Body = &SessionResponse_RecvMsg{RecvMsg: v}
			}
			iNdEx = postIndex
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClearMsg", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Body = &SessionResponse_ClearMsg{ClearMsg: v}
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field AckMsg", wireType)
			}
			var v uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return protobuf_go_lite.ErrIntOverflow
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Body = &SessionResponse_AckMsg{AckMsg: v}
		default:
			iNdEx = preIndex
			skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return protobuf_go_lite.ErrInvalidLength
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
