Skip to content

Commit

Permalink
Support server time in ConnectResult (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia authored May 14, 2024
1 parent 0382247 commit 92a93d8
Show file tree
Hide file tree
Showing 6 changed files with 187 additions and 133 deletions.
275 changes: 142 additions & 133 deletions client.pb.go

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions client.pb_easyjson.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client.proto
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ message ConnectResult {
bool pong = 8;
string session = 9;
string node = 10;
int64 time = 11; // Server time as Unix timestamp in milliseconds (not sent by default).
}

message RefreshRequest {
Expand Down
27 changes: 27 additions & 0 deletions client_vtproto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions definitions/client.proto
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ message ConnectResult {
bool pong = 8;
string session = 9;
string node = 10;
int64 time = 11; // Server time as Unix timestamp in milliseconds (not sent by default).
}

message RefreshRequest {
Expand Down
4 changes: 4 additions & 0 deletions encode_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ func (w *writer) Int32(n int32) {
_, _ = w.Buffer.WriteString(strconv.FormatInt(int64(n), 10))
}

func (w *writer) Int64(n int64) {
_, _ = w.Buffer.WriteString(strconv.FormatInt(n, 10))
}

func (w *writer) Bool(v bool) {
if v {
_, _ = w.Buffer.Write([]byte(`true`))
Expand Down

0 comments on commit 92a93d8

Please sign in to comment.