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/netStringCmd.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/netStringCmd.go')
| -rw-r--r-- | pkg/messages/types/netStringCmd.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/messages/types/netStringCmd.go b/pkg/messages/types/netStringCmd.go index 13d5a13..fb6af2e 100644 --- a/pkg/messages/types/netStringCmd.go +++ b/pkg/messages/types/netStringCmd.go | |||
| @@ -4,17 +4,17 @@ import ( | |||
| 4 | "strings" | 4 | "strings" |
| 5 | 5 | ||
| 6 | "github.com/pektezol/bitreader" | 6 | "github.com/pektezol/bitreader" |
| 7 | "github.com/pektezol/sdp.go/pkg/writer" | 7 | "github.com/pektezol/sdp.go/pkg/types" |
| 8 | ) | 8 | ) |
| 9 | 9 | ||
| 10 | type NetStringCmd struct { | 10 | type NetStringCmd struct { |
| 11 | Command string | 11 | Command string `json:"command"` |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | func ParseNetStringCmd(reader *bitreader.Reader) NetStringCmd { | 14 | func ParseNetStringCmd(reader *bitreader.Reader, demo *types.Demo) NetStringCmd { |
| 15 | netStringCmd := NetStringCmd{ | 15 | netStringCmd := NetStringCmd{ |
| 16 | Command: reader.TryReadString(), | 16 | Command: reader.TryReadString(), |
| 17 | } | 17 | } |
| 18 | writer.TempAppendLine("\t\tCommand: \"%s\"", strings.TrimSpace(netStringCmd.Command)) | 18 | demo.Writer.TempAppendLine("\t\tCommand: \"%s\"", strings.TrimSpace(netStringCmd.Command)) |
| 19 | return netStringCmd | 19 | return netStringCmd |
| 20 | } | 20 | } |