|
@@ -54,8 +54,14 @@ Error TCP_Server::_listen(uint16_t p_port, DVector<String> p_accepted_hosts) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+void TCP_Server::set_ip_type(IP::Type p_type) {
|
|
|
+ stop();
|
|
|
+ ip_type = p_type;
|
|
|
+}
|
|
|
+
|
|
|
void TCP_Server::_bind_methods() {
|
|
|
|
|
|
+ ObjectTypeDB::bind_method(_MD("set_ip_type","ip_type"),&TCP_Server::set_ip_type);
|
|
|
ObjectTypeDB::bind_method(_MD("listen","port","accepted_hosts"),&TCP_Server::_listen,DEFVAL(DVector<String>()));
|
|
|
ObjectTypeDB::bind_method(_MD("is_connection_available"),&TCP_Server::is_connection_available);
|
|
|
ObjectTypeDB::bind_method(_MD("take_connection"),&TCP_Server::take_connection);
|