Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: client/logdog/butlerlib/streamproto/magic.go

Issue 1429993002: LogDog: Add Butler stream server package. (Closed) Base URL: https://github.com/luci/luci-go@logdog-review-butlerproto
Patch Set: Bind POSIX test to POSIX domains. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/logdog/butlerlib/streamclient/stream_test.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/logdog/butlerlib/streamproto/magic.go
diff --git a/client/logdog/butlerlib/streamproto/magic.go b/client/logdog/butlerlib/streamproto/magic.go
index 4eb73615c90b80693aa3c7dfd0572e6d67f6017a..7930084575345d516b6b9a137faab6339f78ec29 100644
--- a/client/logdog/butlerlib/streamproto/magic.go
+++ b/client/logdog/butlerlib/streamproto/magic.go
@@ -7,5 +7,11 @@ package streamproto
var (
// ProtocolFrameHeaderMagic is the number at the beginning of streams that
// identifies the stream handshake version.
+ //
+ // This serves two purposes:
+ // - To disambiguate a Butler stream from some happenstance string of bytes
+ // (which probably won't start with these characters).
+ // - To allow an upgrade to the wire format, if one is ever needed. e.g.,
+ // a switch to something other than recordio/JSON.
ProtocolFrameHeaderMagic = []byte("BTLR1\x1E")
)
« no previous file with comments | « client/logdog/butlerlib/streamclient/stream_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698