Implement UDP listen bind address
This commit is contained in:
@ -59,7 +59,7 @@ void PacketPeerUDP::set_ip_type(IP::Type p_type) {
|
||||
void PacketPeerUDP::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(_MD("set_ip_type","ip_type"),&PacketPeerUDP::set_ip_type);
|
||||
ClassDB::bind_method(_MD("listen:Error","port", "recv_buf_size"),&PacketPeerUDP::listen,DEFVAL(65536));
|
||||
ClassDB::bind_method(_MD("listen:Error","port", "bind_address", "recv_buf_size"),&PacketPeerUDP::listen,DEFVAL("*"),DEFVAL(65536));
|
||||
ClassDB::bind_method(_MD("close"),&PacketPeerUDP::close);
|
||||
ClassDB::bind_method(_MD("wait:Error"),&PacketPeerUDP::wait);
|
||||
ClassDB::bind_method(_MD("is_listening"),&PacketPeerUDP::is_listening);
|
||||
|
||||
@ -45,12 +45,12 @@ protected:
|
||||
|
||||
String _get_packet_ip() const;
|
||||
|
||||
virtual Error _set_dest_address(const String& p_address,int p_port);
|
||||
Error _set_dest_address(const String& p_address,int p_port);
|
||||
|
||||
public:
|
||||
|
||||
virtual void set_ip_type(IP::Type p_type);
|
||||
virtual Error listen(int p_port, int p_recv_buffer_size=65536)=0;
|
||||
virtual Error listen(int p_port, IP_Address p_bind_address=IP_Address("*"), int p_recv_buffer_size=65536)=0;
|
||||
virtual void close()=0;
|
||||
virtual Error wait()=0;
|
||||
virtual bool is_listening() const=0;
|
||||
|
||||
Reference in New Issue
Block a user