Commit 4f871a72 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent bebc5e77
...@@ -39,7 +39,6 @@ type pktBuf struct { ...@@ -39,7 +39,6 @@ type pktBuf struct {
} }
// HeaderN returns pointer to packet header in 'N'-encoding. // HeaderN returns pointer to packet header in 'N'-encoding.
//func (pkt *pktBuf) Header() *proto.PktHeader { return pkt.HeaderN() } // XXX kill
func (pkt *pktBuf) HeaderN() *proto.PktHeader { func (pkt *pktBuf) HeaderN() *proto.PktHeader {
// NOTE no need to check len(.data) < PktHeader: // NOTE no need to check len(.data) < PktHeader:
// .data is always allocated with cap >= PktHeaderLen. // .data is always allocated with cap >= PktHeaderLen.
...@@ -47,7 +46,6 @@ func (pkt *pktBuf) HeaderN() *proto.PktHeader { ...@@ -47,7 +46,6 @@ func (pkt *pktBuf) HeaderN() *proto.PktHeader {
} }
// PayloadN returns []byte representing packet payload in 'N'-encoding. // PayloadN returns []byte representing packet payload in 'N'-encoding.
func (pkt *pktBuf) Payload() []byte { return pkt.PayloadN() } // XXX kill
func (pkt *pktBuf) PayloadN() []byte { func (pkt *pktBuf) PayloadN() []byte {
return pkt.data[proto.PktHeaderLen:] return pkt.data[proto.PktHeaderLen:]
} }
......
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