diff options
Diffstat (limited to 'core/io/stream_peer_tcp.h')
-rw-r--r-- | core/io/stream_peer_tcp.h | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/core/io/stream_peer_tcp.h b/core/io/stream_peer_tcp.h index 4401378743..1733619a1c 100644 --- a/core/io/stream_peer_tcp.h +++ b/core/io/stream_peer_tcp.h @@ -31,16 +31,15 @@ #include "stream_peer.h" -#include "ip_address.h" #include "io/ip.h" +#include "ip_address.h" class StreamPeerTCP : public StreamPeer { - GDCLASS( StreamPeerTCP, StreamPeer ); + GDCLASS(StreamPeerTCP, StreamPeer); OBJ_CATEGORY("Networking"); public: - enum Status { STATUS_NONE, @@ -50,31 +49,29 @@ public: }; protected: - - virtual Error _connect(const String& p_address, int p_port); - static StreamPeerTCP* (*_create)(); + virtual Error _connect(const String &p_address, int p_port); + static StreamPeerTCP *(*_create)(); static void _bind_methods(); public: - - virtual Error connect_to_host(const IP_Address& p_host, uint16_t p_port)=0; + virtual Error connect_to_host(const IP_Address &p_host, uint16_t p_port) = 0; //read/write from streampeer - virtual bool is_connected_to_host() const=0; - virtual Status get_status() const=0; - virtual void disconnect_from_host()=0; - virtual IP_Address get_connected_host() const=0; - virtual uint16_t get_connected_port() const=0; - virtual void set_nodelay(bool p_enabled)=0; + virtual bool is_connected_to_host() const = 0; + virtual Status get_status() const = 0; + virtual void disconnect_from_host() = 0; + virtual IP_Address get_connected_host() const = 0; + virtual uint16_t get_connected_port() const = 0; + virtual void set_nodelay(bool p_enabled) = 0; static Ref<StreamPeerTCP> create_ref(); - static StreamPeerTCP* create(); + static StreamPeerTCP *create(); StreamPeerTCP(); ~StreamPeerTCP(); }; -VARIANT_ENUM_CAST( StreamPeerTCP::Status ); +VARIANT_ENUM_CAST(StreamPeerTCP::Status); #endif |