TCP Networking

Handles the creation and mangement of TCP streams.

testify_network_stream_address_create

THandle *testify_network_stream_address_create(const char *host_name, uint16 port);

Description: Creates a TCP connection that can be both read or written to, connecting to the DNS address given as "host_name". By default the connection will attempt to connect to "port", unless the host_name is frormated in the following way :, then the port number will be read from the host_name. If no host name is given, the function will open up the port, and wait for incomming connections.

testify_network_stream_send_force

int testify_network_stream_send_force(THandle *handle);

Description: Tells a TCP connectiuon to flush all out going data to the network.

testify_network_stream_wait_for_connection

THandle *testify_network_stream_wait_for_connection(THandle *listen, TestifyNetworkAddress *from);

Description: Polls a TCP handle "listen" for incomming connections. If a new connection is obtained a new handle for that connection will be returned. If the pointer from is given, the function will fill out the structure with the IP address and port of the incomming connection if one is obtained.

testify_network_stream_connected

boolean testify_network_stream_connected(THandle *handle);

Description: Returns TRUE is the tcp connection is still active.