1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef TCP_SERVER_H
- #define TCP_SERVER_H
- #include "io/ip.h"
- #include "io/stream_peer.h"
- #include "stream_peer_tcp.h"
- class TCP_Server : public Reference {
- GDCLASS(TCP_Server, Reference);
- protected:
- static TCP_Server *(*_create)();
-
- static void _bind_methods();
- public:
- virtual Error listen(uint16_t p_port, const IP_Address &p_bind_address = IP_Address("*")) = 0;
- virtual bool is_connection_available() const = 0;
- virtual Ref<StreamPeerTCP> take_connection() = 0;
- virtual void stop() = 0;
- static Ref<TCP_Server> create_ref();
- static TCP_Server *create();
- TCP_Server();
- };
- #endif
|