@@ -33,9 +33,10 @@ class UDPPort : public Port {
33
33
rtc::Network* network,
34
34
rtc::AsyncPacketSocket* socket,
35
35
const std::string& username,
36
- const std::string& password) {
37
- UDPPort* port =
38
- new UDPPort (thread, factory, network, socket, username, password);
36
+ const std::string& password,
37
+ const std::string& origin) {
38
+ UDPPort* port = new UDPPort (thread, factory, network, socket,
39
+ username, password, origin);
39
40
if (!port->Init ()) {
40
41
delete port;
41
42
port = NULL ;
@@ -50,15 +51,18 @@ class UDPPort : public Port {
50
51
uint16 min_port,
51
52
uint16 max_port,
52
53
const std::string& username,
53
- const std::string& password) {
54
- UDPPort* port = new UDPPort (thread, factory, network, ip, min_port,
55
- max_port, username, password);
54
+ const std::string& password,
55
+ const std::string& origin) {
56
+ UDPPort* port = new UDPPort (thread, factory, network,
57
+ ip, min_port, max_port,
58
+ username, password, origin);
56
59
if (!port->Init ()) {
57
60
delete port;
58
61
port = NULL ;
59
62
}
60
63
return port;
61
64
}
65
+
62
66
virtual ~UDPPort ();
63
67
64
68
rtc::SocketAddress GetLocalAddress () const {
@@ -105,14 +109,16 @@ class UDPPort : public Port {
105
109
uint16 min_port,
106
110
uint16 max_port,
107
111
const std::string& username,
108
- const std::string& password);
112
+ const std::string& password,
113
+ const std::string& origin);
109
114
110
115
UDPPort (rtc::Thread* thread,
111
116
rtc::PacketSocketFactory* factory,
112
117
rtc::Network* network,
113
118
rtc::AsyncPacketSocket* socket,
114
119
const std::string& username,
115
- const std::string& password);
120
+ const std::string& password,
121
+ const std::string& origin);
116
122
117
123
bool Init ();
118
124
@@ -208,9 +214,12 @@ class StunPort : public UDPPort {
208
214
uint16 min_port, uint16 max_port,
209
215
const std::string& username,
210
216
const std::string& password,
211
- const ServerAddresses& servers) {
212
- StunPort* port = new StunPort (thread, factory, network, ip, min_port,
213
- max_port, username, password, servers);
217
+ const ServerAddresses& servers,
218
+ const std::string& origin) {
219
+ StunPort* port = new StunPort (thread, factory, network,
220
+ ip, min_port, max_port,
221
+ username, password, servers,
222
+ origin);
214
223
if (!port->Init ()) {
215
224
delete port;
216
225
port = NULL ;
@@ -233,9 +242,10 @@ class StunPort : public UDPPort {
233
242
uint16 max_port,
234
243
const std::string& username,
235
244
const std::string& password,
236
- const ServerAddresses& servers)
245
+ const ServerAddresses& servers,
246
+ const std::string& origin)
237
247
: UDPPort(thread, factory, network, ip, min_port, max_port, username,
238
- password) {
248
+ password, origin ) {
239
249
// UDPPort will set these to local udp, updating these to STUN.
240
250
set_type (STUN_PORT_TYPE);
241
251
set_server_addresses (servers);
0 commit comments