diff options
author | Keuin <[email protected]> | 2023-07-30 19:42:41 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-07-30 19:42:41 +0800 |
commit | e8c1fc39eccf977c702b1932252075cdc3eeed95 (patch) | |
tree | 0da932e7f144544c7e6c5b834da4a52e46d80d93 /danmaku/dmpkg | |
parent | 3fad4189646cca5d6db99ccfe79be695ef765d03 (diff) |
Diffstat (limited to 'danmaku/dmpkg')
-rw-r--r-- | danmaku/dmpkg/package.go | 5 |
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 |