aboutsummaryrefslogtreecommitdiff
path: root/packets/messages/types/SvcVoiceData.go
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2022-11-10 22:59:32 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-09-16 21:39:40 +0300
commit9f5e8f230d35fffb106088b72e5fdb148905f450 (patch)
tree2f22a5357a7bea2ce516b9a5e56e21435414529a /packets/messages/types/SvcVoiceData.go
parentupgraded to v1.2.3 (diff)
downloadsdp.go-9f5e8f230d35fffb106088b72e5fdb148905f450.tar.gz
sdp.go-9f5e8f230d35fffb106088b72e5fdb148905f450.tar.bz2
sdp.go-9f5e8f230d35fffb106088b72e5fdb148905f450.zip
added almost all net/svc messages - currently broken
Diffstat (limited to 'packets/messages/types/SvcVoiceData.go')
-rw-r--r--packets/messages/types/SvcVoiceData.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/packets/messages/types/SvcVoiceData.go b/packets/messages/types/SvcVoiceData.go
new file mode 100644
index 0000000..f99db38
--- /dev/null
+++ b/packets/messages/types/SvcVoiceData.go
@@ -0,0 +1,19 @@
1package types
2
3import "github.com/pektezol/bitreader"
4
5type SvcVoiceData struct {
6 Client int8
7 Proximity int8
8 Data []byte
9}
10
11func ParseSvcVoiceData(reader *bitreader.ReaderType) SvcVoiceData {
12 svcvoicedata := SvcVoiceData{
13 Client: int8(reader.TryReadInt8()),
14 Proximity: int8(reader.TryReadInt8()),
15 }
16 length := reader.TryReadInt16()
17 svcvoicedata.Data = reader.TryReadBytesToSlice(int(length / 8))
18 return svcvoicedata
19}