func (r *Record) String() string {
	return fmt.Sprintf("%d\n%x\n%x", r.Id, r.Query, r.Reply)
}
Implementation of fmt.Stringer
package pcat
import (
	"fmt"
	"io"
	"github.com/cznic/fileutil"
)
type lex struct {
	ofs     int64
	buf     []byte
	column  int
	current byte
	line    int
	src     io.ByteReader
}
func newLex(src io.ByteReader) *lex {
	l := &lex{src: src, line: 1, column: 1}
	l.getc()
	return l
}
func (l *lex) getc() (b byte, err error) {
	switch b = l.current; b {
	case 0:
		break
	case '\n':
		l.line++
		l.column = 0
		fallthrough
	default:
		l.column++
		l.buf = append(l.buf, b)
	}
	l.current = 0
	b, err = l.src.ReadByte()
	if err != nil {
		b = 0
		if !fileutil.IsEOF(err) {
			return
		}
		err = nil
	}
	l.ofs++
	l.current = b
	return
}
type Record struct {
	Id    int     
	Query []byte  
	Reply []byte  
}