Inherits: Reference < Object

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 ( )


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.

Listen on a port, alternatively give a white-list of accepted hosts.

  • void stop ( )

Stop listening.

If a connection is available, return a StreamPeerTCP with the connection/