mirror of https://github.com/OpenVidu/openvidu.git
Server SDKs: Connection ip property
parent
2cba879541
commit
58c4d565f6
|
@ -37,6 +37,7 @@ public class Connection {
|
||||||
private Long createdAt;
|
private Long createdAt;
|
||||||
private Long activeAt;
|
private Long activeAt;
|
||||||
private String location;
|
private String location;
|
||||||
|
private String ip;
|
||||||
private String platform;
|
private String platform;
|
||||||
private String clientData;
|
private String clientData;
|
||||||
private ConnectionProperties connectionProperties;
|
private ConnectionProperties connectionProperties;
|
||||||
|
@ -215,6 +216,13 @@ public class Connection {
|
||||||
return location;
|
return location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the IP of the connection, as seen by OpenVidu Server
|
||||||
|
*/
|
||||||
|
public String getIp() {
|
||||||
|
return ip;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a complete description of the platform used by the participant to
|
* Returns a complete description of the platform used by the participant to
|
||||||
* connect to the session
|
* connect to the session
|
||||||
|
@ -262,6 +270,7 @@ public class Connection {
|
||||||
json.addProperty("createdAt", this.createdAt());
|
json.addProperty("createdAt", this.createdAt());
|
||||||
json.addProperty("activeAt", this.activeAt());
|
json.addProperty("activeAt", this.activeAt());
|
||||||
json.addProperty("location", this.getLocation());
|
json.addProperty("location", this.getLocation());
|
||||||
|
json.addProperty("ip", this.getIp());
|
||||||
json.addProperty("platform", this.getPlatform());
|
json.addProperty("platform", this.getPlatform());
|
||||||
json.addProperty("clientData", this.getClientData());
|
json.addProperty("clientData", this.getClientData());
|
||||||
json.addProperty("token", this.getToken());
|
json.addProperty("token", this.getToken());
|
||||||
|
@ -383,6 +392,9 @@ public class Connection {
|
||||||
if (!json.get("location").isJsonNull()) {
|
if (!json.get("location").isJsonNull()) {
|
||||||
this.location = json.get("location").getAsString();
|
this.location = json.get("location").getAsString();
|
||||||
}
|
}
|
||||||
|
if (!json.get("ip").isJsonNull()) {
|
||||||
|
this.ip = json.get("ip").getAsString();
|
||||||
|
}
|
||||||
if (!json.get("platform").isJsonNull()) {
|
if (!json.get("platform").isJsonNull()) {
|
||||||
this.platform = json.get("platform").getAsString();
|
this.platform = json.get("platform").getAsString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,11 @@ export class Connection {
|
||||||
*/
|
*/
|
||||||
location: string;
|
location: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IP of the Connection, as seen by OpenVidu Server
|
||||||
|
*/
|
||||||
|
ip: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A complete description of the platform used by the participant to connect to the session
|
* A complete description of the platform used by the participant to connect to the session
|
||||||
*/
|
*/
|
||||||
|
@ -119,6 +124,7 @@ export class Connection {
|
||||||
this.createdAt = json.createdAt;
|
this.createdAt = json.createdAt;
|
||||||
this.activeAt = json.activeAt;
|
this.activeAt = json.activeAt;
|
||||||
this.location = json.location;
|
this.location = json.location;
|
||||||
|
this.ip = json.ip;
|
||||||
this.platform = json.platform;
|
this.platform = json.platform;
|
||||||
this.clientData = json.clientData;
|
this.clientData = json.clientData;
|
||||||
this.token = json.token;
|
this.token = json.token;
|
||||||
|
@ -220,6 +226,7 @@ export class Connection {
|
||||||
this.connectionProperties.networkCache === other.connectionProperties.networkCache &&
|
this.connectionProperties.networkCache === other.connectionProperties.networkCache &&
|
||||||
this.token === other.token &&
|
this.token === other.token &&
|
||||||
this.location === other.location &&
|
this.location === other.location &&
|
||||||
|
this.ip === other.ip &&
|
||||||
this.platform === other.platform &&
|
this.platform === other.platform &&
|
||||||
this.clientData === other.clientData &&
|
this.clientData === other.clientData &&
|
||||||
this.subscribers.length === other.subscribers.length &&
|
this.subscribers.length === other.subscribers.length &&
|
||||||
|
|
Loading…
Reference in New Issue