1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Rename IP_Unix, IP_Address and TCP_Server to remove underscores

This commit is contained in:
Hugo Locurcio
2021-05-06 02:48:18 +02:00
parent 758bccf364
commit 3f078c99f6
60 changed files with 253 additions and 253 deletions

View File

@@ -121,8 +121,8 @@ void EMWSClient::disconnect_from_host(int p_code, String p_reason) {
_peer->close(p_code, p_reason);
}
IP_Address EMWSClient::get_connected_host() const {
ERR_FAIL_V_MSG(IP_Address(), "Not supported in HTML5 export.");
IPAddress EMWSClient::get_connected_host() const {
ERR_FAIL_V_MSG(IPAddress(), "Not supported in HTML5 export.");
}
uint16_t EMWSClient::get_connected_port() const {

View File

@@ -56,7 +56,7 @@ public:
Error connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, const Vector<String> p_protocol = Vector<String>(), const Vector<String> p_custom_headers = Vector<String>());
Ref<WebSocketPeer> get_peer(int p_peer_id) const;
void disconnect_from_host(int p_code = 1000, String p_reason = "");
IP_Address get_connected_host() const;
IPAddress get_connected_host() const;
uint16_t get_connected_port() const;
virtual ConnectionStatus get_connection_status() const;
int get_max_packet_size() const;

View File

@@ -93,8 +93,8 @@ void EMWSPeer::close(int p_code, String p_reason) {
peer_sock = -1;
};
IP_Address EMWSPeer::get_connected_host() const {
ERR_FAIL_V_MSG(IP_Address(), "Not supported in HTML5 export.");
IPAddress EMWSPeer::get_connected_host() const {
ERR_FAIL_V_MSG(IPAddress(), "Not supported in HTML5 export.");
};
uint16_t EMWSPeer::get_connected_port() const {

View File

@@ -73,7 +73,7 @@ public:
virtual void close(int p_code = 1000, String p_reason = "");
virtual bool is_connected_to_host() const;
virtual IP_Address get_connected_host() const;
virtual IPAddress get_connected_host() const;
virtual uint16_t get_connected_port() const;
virtual WriteMode get_write_mode() const;

View File

@@ -58,8 +58,8 @@ Vector<String> EMWSServer::get_protocols() const {
return out;
}
IP_Address EMWSServer::get_peer_address(int p_peer_id) const {
return IP_Address();
IPAddress EMWSServer::get_peer_address(int p_peer_id) const {
return IPAddress();
}
int EMWSServer::get_peer_port(int p_peer_id) const {

View File

@@ -47,7 +47,7 @@ public:
bool is_listening() const;
bool has_peer(int p_id) const;
Ref<WebSocketPeer> get_peer(int p_id) const;
IP_Address get_peer_address(int p_peer_id) const;
IPAddress get_peer_address(int p_peer_id) const;
int get_peer_port(int p_peer_id) const;
void disconnect_peer(int p_peer_id, int p_code = 1000, String p_reason = "");
int get_max_packet_size() const;

View File

@@ -57,7 +57,7 @@ public:
virtual Error connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, const Vector<String> p_protocol = Vector<String>(), const Vector<String> p_custom_headers = Vector<String>()) = 0;
virtual void disconnect_from_host(int p_code = 1000, String p_reason = "") = 0;
virtual IP_Address get_connected_host() const = 0;
virtual IPAddress get_connected_host() const = 0;
virtual uint16_t get_connected_port() const = 0;
virtual bool is_server() const override;

View File

@@ -55,7 +55,7 @@ public:
virtual void close(int p_code = 1000, String p_reason = "") = 0;
virtual bool is_connected_to_host() const = 0;
virtual IP_Address get_connected_host() const = 0;
virtual IPAddress get_connected_host() const = 0;
virtual uint16_t get_connected_port() const = 0;
virtual bool was_string_packet() const = 0;
virtual void set_no_delay(bool p_enabled) = 0;

View File

@@ -34,7 +34,7 @@ GDCINULL(WebSocketServer);
WebSocketServer::WebSocketServer() {
_peer_id = 1;
bind_ip = IP_Address("*");
bind_ip = IPAddress("*");
}
WebSocketServer::~WebSocketServer() {
@@ -71,11 +71,11 @@ void WebSocketServer::_bind_methods() {
ADD_SIGNAL(MethodInfo("data_received", PropertyInfo(Variant::INT, "id")));
}
IP_Address WebSocketServer::get_bind_ip() const {
IPAddress WebSocketServer::get_bind_ip() const {
return bind_ip;
}
void WebSocketServer::set_bind_ip(const IP_Address &p_bind_ip) {
void WebSocketServer::set_bind_ip(const IPAddress &p_bind_ip) {
ERR_FAIL_COND(is_listening());
ERR_FAIL_COND(!p_bind_ip.is_valid() && !p_bind_ip.is_wildcard());
bind_ip = p_bind_ip;

View File

@@ -40,7 +40,7 @@ class WebSocketServer : public WebSocketMultiplayerPeer {
GDCLASS(WebSocketServer, WebSocketMultiplayerPeer);
GDCICLASS(WebSocketServer);
IP_Address bind_ip;
IPAddress bind_ip;
protected:
static void _bind_methods();
@@ -57,7 +57,7 @@ public:
virtual bool is_server() const override;
ConnectionStatus get_connection_status() const override;
virtual IP_Address get_peer_address(int p_peer_id) const = 0;
virtual IPAddress get_peer_address(int p_peer_id) const = 0;
virtual int get_peer_port(int p_peer_id) const = 0;
virtual void disconnect_peer(int p_peer_id, int p_code = 1000, String p_reason = "") = 0;
@@ -66,8 +66,8 @@ public:
void _on_disconnect(int32_t p_peer_id, bool p_was_clean);
void _on_close_request(int32_t p_peer_id, int p_code, String p_reason);
IP_Address get_bind_ip() const;
void set_bind_ip(const IP_Address &p_bind_ip);
IPAddress get_bind_ip() const;
void set_bind_ip(const IPAddress &p_bind_ip);
Ref<CryptoKey> get_private_key() const;
void set_private_key(Ref<CryptoKey> p_key);

View File

@@ -160,7 +160,7 @@ Error WSLClient::connect_to_host(String p_host, String p_path, uint16_t p_port,
ERR_FAIL_COND_V(_connection.is_valid(), ERR_ALREADY_IN_USE);
_peer = Ref<WSLPeer>(memnew(WSLPeer));
IP_Address addr;
IPAddress addr;
if (!p_host.is_valid_ip_address()) {
addr = IP::get_singleton()->resolve_hostname(p_host);
@@ -316,8 +316,8 @@ void WSLClient::disconnect_from_host(int p_code, String p_reason) {
_resp_pos = 0;
}
IP_Address WSLClient::get_connected_host() const {
ERR_FAIL_COND_V(!_peer->is_connected_to_host(), IP_Address());
IPAddress WSLClient::get_connected_host() const {
ERR_FAIL_COND_V(!_peer->is_connected_to_host(), IPAddress());
return _peer->get_connected_host();
}

View File

@@ -75,7 +75,7 @@ public:
int get_max_packet_size() const;
Ref<WebSocketPeer> get_peer(int p_peer_id) const;
void disconnect_from_host(int p_code = 1000, String p_reason = "");
IP_Address get_connected_host() const;
IPAddress get_connected_host() const;
uint16_t get_connected_port() const;
virtual ConnectionStatus get_connection_status() const;
virtual void poll();

View File

@@ -305,8 +305,8 @@ void WSLPeer::close(int p_code, String p_reason) {
_packet_buffer.resize(0);
}
IP_Address WSLPeer::get_connected_host() const {
ERR_FAIL_COND_V(!is_connected_to_host() || _data->tcp.is_null(), IP_Address());
IPAddress WSLPeer::get_connected_host() const {
ERR_FAIL_COND_V(!is_connected_to_host() || _data->tcp.is_null(), IPAddress());
return _data->tcp->get_connected_host();
}

View File

@@ -90,7 +90,7 @@ public:
virtual void close_now();
virtual void close(int p_code = 1000, String p_reason = "");
virtual bool is_connected_to_host() const;
virtual IP_Address get_connected_host() const;
virtual IPAddress get_connected_host() const;
virtual uint16_t get_connected_port() const;
virtual WriteMode get_write_mode() const;

View File

@@ -272,8 +272,8 @@ Ref<WebSocketPeer> WSLServer::get_peer(int p_id) const {
return _peer_map[p_id];
}
IP_Address WSLServer::get_peer_address(int p_peer_id) const {
ERR_FAIL_COND_V(!has_peer(p_peer_id), IP_Address());
IPAddress WSLServer::get_peer_address(int p_peer_id) const {
ERR_FAIL_COND_V(!has_peer(p_peer_id), IPAddress());
return _peer_map[p_peer_id]->get_connected_host();
}

View File

@@ -73,7 +73,7 @@ private:
int _out_pkt_size = DEF_PKT_SHIFT;
List<Ref<PendingPeer>> _pending;
Ref<TCP_Server> _server;
Ref<TCPServer> _server;
Vector<String> _protocols;
public:
@@ -84,7 +84,7 @@ public:
int get_max_packet_size() const;
bool has_peer(int p_id) const;
Ref<WebSocketPeer> get_peer(int p_id) const;
IP_Address get_peer_address(int p_peer_id) const;
IPAddress get_peer_address(int p_peer_id) const;
int get_peer_port(int p_peer_id) const;
void disconnect_peer(int p_peer_id, int p_code = 1000, String p_reason = "");
virtual void poll();