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 set_ip_type ( int ip_type )
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 using protocol, alternatively give a white-list of accepted hosts.

  • void set_ip_type ( int ip_type )
  • void stop ( )

Stop listening.

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