knIPV4Endpoint_toString
This commit is contained in:
@@ -49,7 +49,7 @@ void* tcp_client_connect_async(void* _data){
|
||||
tryLast(knSocketTCP_connect(data->socket_client, data->serverEnd), _m8531,;);
|
||||
kprintf_safe("\e[92mclient socket connected to server\n");
|
||||
|
||||
char* adrstr = knIPV4Endpoint_toString(&data->socket_client->localEndpoint);
|
||||
char* adrstr = knIPV4Endpoint_toString(data->socket_client->localEndpoint);
|
||||
kprintf("\e[92mclient socket was implicitely bound to %s\n\e[94m", adrstr);
|
||||
free(adrstr);
|
||||
|
||||
@@ -167,7 +167,7 @@ void test_udp(){
|
||||
tryLast(knSocketUDP_sendTo(socket_client, client_msg, sizeof(client_msg), serverEnd), _mu75q2, ;);
|
||||
kprintf("\e[92mmessage sent to server\n\e[94m");
|
||||
|
||||
char* adrstr = knIPV4Endpoint_toString(&socket_client->localEndpoint);
|
||||
char* adrstr = knIPV4Endpoint_toString(socket_client->localEndpoint);
|
||||
kprintf("\e[92mclient socket was implicitely bound to %s\n\e[94m", adrstr);
|
||||
free(adrstr);
|
||||
}
|
||||
@@ -185,7 +185,7 @@ void test_udp(){
|
||||
|
||||
const char server_msg[] = "pong";
|
||||
tryLast(knSocketUDP_sendTo(socket_server, server_msg, sizeof(server_msg), clientEnd), _mu75q2, ;);
|
||||
char* adrstr = knIPV4Endpoint_toString(&clientEnd);
|
||||
char* adrstr = knIPV4Endpoint_toString(clientEnd);
|
||||
kprintf("\e[92mmessage sent to client (%s)\n\e[94m", adrstr);
|
||||
free(adrstr);
|
||||
fflush(stdout);
|
||||
@@ -200,7 +200,7 @@ void test_udp(){
|
||||
fputc('\n', stdout);
|
||||
if(!cptr_equals(received_server_msg, "pong"))
|
||||
throw("received_server_msg != \"pong\"");
|
||||
char* adrstr = knIPV4Endpoint_toString(&serverEnd);
|
||||
char* adrstr = knIPV4Endpoint_toString(serverEnd);
|
||||
kprintf("\e[92mmessage received by client (%s)\n", adrstr);
|
||||
free(adrstr);
|
||||
fflush(stdout);
|
||||
|
||||
@@ -24,19 +24,19 @@ void test_network();
|
||||
inline void test_all(){
|
||||
kprintf("\e[97mkerep tests are starting!\n");
|
||||
optime(__func__, 1,
|
||||
// test_cptr();
|
||||
// test_type_system();
|
||||
// test_string();
|
||||
// test_safethrow();
|
||||
// test_searchtree();
|
||||
// test_autoarr();
|
||||
// test_autoarrVsVector();
|
||||
// test_rng_algorithms();
|
||||
// test_kprint_colors();
|
||||
// test_kprint();
|
||||
// test_hash_functions();
|
||||
// test_hashtable();
|
||||
// test_dtsod();
|
||||
test_cptr();
|
||||
test_type_system();
|
||||
test_string();
|
||||
test_safethrow();
|
||||
test_searchtree();
|
||||
test_autoarr();
|
||||
test_autoarrVsVector();
|
||||
test_rng_algorithms();
|
||||
test_kprint_colors();
|
||||
test_kprint();
|
||||
test_hash_functions();
|
||||
test_hashtable();
|
||||
test_dtsod();
|
||||
test_network();
|
||||
kprintf("\e[96m--------------------------------------\e[0m\n");
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user