summaryrefslogtreecommitdiff
path: root/danmaku
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-07-30 19:42:41 +0800
committerKeuin <[email protected]>2023-07-30 19:42:41 +0800
commite8c1fc39eccf977c702b1932252075cdc3eeed95 (patch)
tree0da932e7f144544c7e6c5b834da4a52e46d80d93 /danmaku
parent3fad4189646cca5d6db99ccfe79be695ef765d03 (diff)
Add Danmaku decode CLI toolHEADmaster
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