-
Notifications
You must be signed in to change notification settings - Fork 18
/
candidate.go
82 lines (68 loc) · 1.57 KB
/
candidate.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package sdp
type CandidateInfo struct {
foundation string
componentID int
transport string
priority int
address string
port int
ctype string
relAddr string
relPort int
}
func NewCandidateInfo(foundation string, componentID int, transport string,
priority int, address string, port int, ctype string, relAddr string, relPort int) *CandidateInfo {
candidate := &CandidateInfo{
foundation: foundation,
componentID: componentID,
transport: transport,
priority: priority,
address: address,
port: port,
ctype: ctype,
relAddr: relAddr,
relPort: relPort,
}
return candidate
}
func (c *CandidateInfo) Clone() *CandidateInfo {
candidate := &CandidateInfo{
foundation: c.foundation,
componentID: c.componentID,
transport: c.transport,
priority: c.priority,
address: c.address,
port: c.port,
ctype: c.ctype,
relAddr: c.relAddr,
relPort: c.relPort,
}
return candidate
}
func (c *CandidateInfo) GetFoundation() string {
return c.foundation
}
func (c *CandidateInfo) GetComponentID() int {
return c.componentID
}
func (c *CandidateInfo) GetTransport() string {
return c.transport
}
func (c *CandidateInfo) GetPriority() int {
return c.priority
}
func (c *CandidateInfo) GetAddress() string {
return c.address
}
func (c *CandidateInfo) GetPort() int {
return c.port
}
func (c *CandidateInfo) GetType() string {
return c.ctype
}
func (c *CandidateInfo) GetRelAddr() string {
return c.relAddr
}
func (c *CandidateInfo) GetRelPort() int {
return c.relPort
}