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/classes/stop.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/classes/stop.go')
| -rw-r--r-- | pkg/classes/stop.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/classes/stop.go b/pkg/classes/stop.go index 97db6cf..c6b52a9 100644 --- a/pkg/classes/stop.go +++ b/pkg/classes/stop.go | |||
| @@ -2,16 +2,16 @@ package classes | |||
| 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 Stop struct { | 8 | type Stop struct { |
| 9 | RemainingData []byte | 9 | RemainingData []byte `json:"remaining_data"` |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | func (stop *Stop) ParseStop(reader *bitreader.Reader) { | 12 | func (stop *Stop) ParseStop(reader *bitreader.Reader, demo *types.Demo) { |
| 13 | if reader.TryReadBool() { | 13 | if reader.TryReadBool() { |
| 14 | stop.RemainingData = reader.TryReadBitsToSlice(uint64(reader.TryReadRemainingBits())) | 14 | stop.RemainingData = reader.TryReadBitsToSlice(uint64(reader.TryReadRemainingBits())) |
| 15 | writer.AppendLine("\tRemaining Data: %v", stop.RemainingData) | 15 | demo.Writer.AppendLine("\tRemaining Data: %v", stop.RemainingData) |
| 16 | } | 16 | } |
| 17 | } | 17 | } |