diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-06-15 13:58:30 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-15 13:58:30 +0300 |
| commit | 77e4b066cb8d506b4bc944ab4eb2d6e4679e2202 (patch) | |
| tree | 1d549eca619ed36cb881e487cb054c4643ac8376 /pkg/messages/types/svcUpdateStringTable.go | |
| parent | change project name to sdp.go (diff) | |
| download | sdp.go-77e4b066cb8d506b4bc944ab4eb2d6e4679e2202.tar.gz sdp.go-77e4b066cb8d506b4bc944ab4eb2d6e4679e2202.tar.bz2 sdp.go-77e4b066cb8d506b4bc944ab4eb2d6e4679e2202.zip | |
enable multithreading with goroutines (#20)
Diffstat (limited to 'pkg/messages/types/svcUpdateStringTable.go')
| -rw-r--r-- | pkg/messages/types/svcUpdateStringTable.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/messages/types/svcUpdateStringTable.go b/pkg/messages/types/svcUpdateStringTable.go index 11e63d4..7e15cd2 100644 --- a/pkg/messages/types/svcUpdateStringTable.go +++ b/pkg/messages/types/svcUpdateStringTable.go | |||
| @@ -2,17 +2,17 @@ package messages | |||
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | "github.com/pektezol/bitreader" | 4 | "github.com/pektezol/bitreader" |
| 5 | "github.com/pektezol/sdp.go/pkg/writer" | 5 | "github.com/pektezol/sdp.go/pkg/types" |
| 6 | ) | 6 | ) |
| 7 | 7 | ||
| 8 | type SvcUpdateStringTable struct { | 8 | type SvcUpdateStringTable struct { |
| 9 | TableId uint8 | 9 | TableId uint8 `json:"table_id"` |
| 10 | NumChangedEntries uint16 | 10 | NumChangedEntries uint16 `json:"num_changed_entries"` |
| 11 | Length int32 | 11 | Length int32 `json:"length"` |
| 12 | Data []byte | 12 | Data []byte `json:"data"` |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | func ParseSvcUpdateStringTable(reader *bitreader.Reader) SvcUpdateStringTable { | 15 | func ParseSvcUpdateStringTable(reader *bitreader.Reader, demo *types.Demo) SvcUpdateStringTable { |
| 16 | svcUpdateStringTable := SvcUpdateStringTable{ | 16 | svcUpdateStringTable := SvcUpdateStringTable{ |
| 17 | TableId: uint8(reader.TryReadBits(5)), | 17 | TableId: uint8(reader.TryReadBits(5)), |
| 18 | } | 18 | } |
| @@ -21,7 +21,7 @@ func ParseSvcUpdateStringTable(reader *bitreader.Reader) SvcUpdateStringTable { | |||
| 21 | } | 21 | } |
| 22 | svcUpdateStringTable.Length = int32(reader.TryReadBits(20)) | 22 | svcUpdateStringTable.Length = int32(reader.TryReadBits(20)) |
| 23 | svcUpdateStringTable.Data = reader.TryReadBitsToSlice(uint64(svcUpdateStringTable.Length)) | 23 | svcUpdateStringTable.Data = reader.TryReadBitsToSlice(uint64(svcUpdateStringTable.Length)) |
| 24 | writer.TempAppendLine("\t\tTable ID: %d", svcUpdateStringTable.TableId) | 24 | demo.Writer.TempAppendLine("\t\tTable ID: %d", svcUpdateStringTable.TableId) |
| 25 | writer.TempAppendLine("\t\tNumber Of Changed Entries: %d", svcUpdateStringTable.NumChangedEntries) | 25 | demo.Writer.TempAppendLine("\t\tNumber Of Changed Entries: %d", svcUpdateStringTable.NumChangedEntries) |
| 26 | return svcUpdateStringTable | 26 | return svcUpdateStringTable |
| 27 | } | 27 | } |