summaryrefslogtreecommitdiff
path: root/danmaku
diff options
context:
space:
mode:
Diffstat (limited to 'danmaku')
-rw-r--r--danmaku/dmpkg/package.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/danmaku/dmpkg/package.go b/danmaku/dmpkg/package.go
index 51c769a..639bde8 100644
--- a/danmaku/dmpkg/package.go
+++ b/danmaku/dmpkg/package.go
@@ -31,6 +31,11 @@ func (e *DanmakuExchange) String() string {
e.Length, e.ProtocolVer, e.Operation, e.Body)
}
+func (e *DanmakuExchange) PrettyString() string {
+ return fmt.Sprintf("DanmakuExchange{length=%v, protocol=%v, operation=%v, body=%v}",
+ e.Length, e.ProtocolVer, e.Operation.String(), string(e.Body))
+}
+
const (
HeaderLength = 16
SequenceId = 1