Cold Help System: Programming: ColdC Reference Manual: Functions: Network: connection()


LIST connection()

This function returns a list of information on the current connection. If no connection exists, ~net is thrown. The list is ordered as:

  1. INTEGER boolean (true if the connection is readable)
  2. INTEGER boolean (true if the connection is writable)
  3. INTEGER boolean (true if the connection is dead)
  4. INTEGER file descriptor

Most of this information is useful only for debugging, as it can change immediately (all but the file descriptor). This function is useful for determining if the current object has a valid connection.


bind_port() | close_connection() | connection() | cwrite() | cwritef() | open_connection() | reassign_connection() | unbind_port()


the Cold Dark