diff options
Diffstat (limited to 'core/io/packet_peer_udp.h')
-rw-r--r-- | core/io/packet_peer_udp.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/core/io/packet_peer_udp.h b/core/io/packet_peer_udp.h index 726406887c..c316faad4b 100644 --- a/core/io/packet_peer_udp.h +++ b/core/io/packet_peer_udp.h @@ -29,35 +29,31 @@ #ifndef PACKET_PEER_UDP_H #define PACKET_PEER_UDP_H - #include "io/ip.h" #include "io/packet_peer.h" class PacketPeerUDP : public PacketPeer { - GDCLASS(PacketPeerUDP,PacketPeer); + GDCLASS(PacketPeerUDP, PacketPeer); protected: - - static PacketPeerUDP* (*_create)(); + static PacketPeerUDP *(*_create)(); static void _bind_methods(); String _get_packet_ip() const; - Error _set_dest_address(const String& p_address,int p_port); + Error _set_dest_address(const String &p_address, int p_port); public: - - 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; - virtual IP_Address get_packet_address() const=0; - virtual int get_packet_port() const=0; - virtual void set_dest_address(const IP_Address& p_address,int p_port)=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; + virtual IP_Address get_packet_address() const = 0; + virtual int get_packet_port() const = 0; + virtual void set_dest_address(const IP_Address &p_address, int p_port) = 0; static Ref<PacketPeerUDP> create_ref(); - static PacketPeerUDP* create(); + static PacketPeerUDP *create(); PacketPeerUDP(); }; |