TESTIFY_H

testify_Testify_.html

U_BUFFER_SIZE 2048

TESTIFY_DEBUG

Enum:

THandleType

T_HT_STREAMING_SERVER

T_HT_STREAMING_CONNECTION

T_HT_PACKET_PEER

T_HT_FILE_READ

T_HT_FILE_WRITE

T_HT_BUFFER

Struct:

TestifyNetworkAddress

uint32 ip

uint16 port

TestifyNetworkAddress

#define TESTIFY_NETWORK_PEER_MESSAGE_LENGTH 200

typedef struct{ TestifyNetworkAddress address

char message[TESTIFY_NETWORK_PEER_MESSAGE_LENGTH]

boolean local

TestifyNetworkPeer

Description: ---------- TCP Networking -------- Handles the creation and mangement of TCP streams.

extern THandle *testify_network_stream_address_create(const char *host_name

uint16 port)

* 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.

extern int testify_network_stream_send_force(THandle *handle)

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

extern THandle *testify_network_stream_wait_for_connection(THandle *listen

TestifyNetworkAddress *from)

*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.

extern boolean testify_network_stream_connected(THandle *handle)

*Returns TRUE is the tcp connection is still active.

Description: ---------- UDP Networking -------- Handles the creation and mangement of UDP datagrams.

extern boolean testify_network_address_lookup(TestifyNetworkAddress *address

char *dns_name

uint16 default_port)

* look up a DNS address and turn it in to a IP and port. Returns TRUE if sucessfull. The default port will be set unless the dns_name contains a port in the following format hostname:portnumber .

extern THandle *testify_network_datagram_create(uint16 port)

* Opens a port for receving and sending UDP traffic on a specific port.

extern int testify_network_datagram_send(THandle *handle

TestifyNetworkAddress *to)

* Sends the data collected in handle to the IP and address specifyed in "to".

extern int testify_network_receive(THandle *handle

TestifyNetworkAddress *from)

TESTIFY_NETWORK_PEER_MESSAGE_LENGTH 200

Struct:

TestifyNetworkPeer

TestifyNetworkAddress address

char message[TESTIFY_NETWORK_PEER_MESSAGE_LENGTH]

boolean local

TestifyNetworkPeer

Description: ---------- TCP Networking -------- Handles the creation and mangement of TCP streams.

extern THandle *testify_network_stream_address_create(const char *host_name

uint16 port)

* 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.

extern int testify_network_stream_send_force(THandle *handle)

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

extern THandle *testify_network_stream_wait_for_connection(THandle *listen

TestifyNetworkAddress *from)

*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.

extern boolean testify_network_stream_connected(THandle *handle)

*Returns TRUE is the tcp connection is still active.

Description: ---------- UDP Networking -------- Handles the creation and mangement of UDP datagrams.

extern boolean testify_network_address_lookup(TestifyNetworkAddress *address

char *dns_name

uint16 default_port)

* look up a DNS address and turn it in to a IP and port. Returns TRUE if sucessfull. The default port will be set unless the dns_name contains a port in the following format hostname:portnumber .

extern THandle *testify_network_datagram_create(uint16 port)

* Opens a port for receving and sending UDP traffic on a specific port.

extern int testify_network_datagram_send(THandle *handle

TestifyNetworkAddress *to)

* Sends the data collected in handle to the IP and address specifyed in "to".

extern int testify_network_receive(THandle *handle

TestifyNetworkAddress *from)

testify_Debugging_.html

ADDRESS_MAX_NETWORK_ADDRES_STRING_SIZE 22