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