class_tcp_server - dragonsoulz/godot GitHub Wiki
TCP_Server
####Inherits: Reference ####Category: Core
Brief Description
TCP Server.
Member Functions
- int listen ( int port, StringArray accepted_hosts=StringArray() )
- bool is_connection_available ( ) const
- Object take_connection ( )
- void stop ( )
Description
TCP Server class. Listens to connections on a port and returns a StreamPeerTCP when got a connection.
Member Function Description
listen
- int listen ( int port, StringArray accepted_hosts=StringArray() )
Listen on a port, alternatively give a white-list of accepted hosts.
is_connection_available
- bool is_connection_available ( ) const
Return true if a connection is available for taking.
take_connection
- Object take_connection ( )
If a connection is available, return a StreamPeerTCP with the connection/
stop
- void stop ( )
Stop listening.