Skip to content

Commit

Permalink
need to test with xdp and raw packets tomorrow to verify the TOS bit …
Browse files Browse the repository at this point in the history
…gets set
  • Loading branch information
gafferongames committed Sep 18, 2024
1 parent c8cb126 commit 85cc4d0
Showing 1 changed file with 11 additions and 31 deletions.
42 changes: 11 additions & 31 deletions netcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,18 +479,11 @@ static int netcode_set_socket_codepoint( SOCKET socket, QOS_TRAFFIC_TYPE traffic
HANDLE qosHandle;
if ( QOSCreateHandle( &QosVersion, &qosHandle ) == FALSE )
{
// todo
printf( "QOSCreateHandler failed\n" );
return GetLastError();
}
// todo
(void) addr;
if ( QOSAddSocketToFlow( qosHandle, socket, addr, trafficType, QOS_NON_ADAPTIVE_FLOW, &flowId ) == FALSE )
{
// todo
int error = GetLastError();
printf( "QOSAddSocketToFlow failed: %d\n", error );
return error;
return GetLastError();
}
return 0;
}
Expand Down Expand Up @@ -9170,8 +9163,12 @@ void test_packet_tagging()
{
NETCODE_CONST char * server_address = "127.0.0.1:40000";

// todo
printf( "client ipv4\n" );
struct netcode_server_config_t server_config;
netcode_default_server_config( &server_config );

struct netcode_server_t * server = netcode_server_create( server_address, &server_config, 0.0 );

check( server );

struct netcode_client_config_t client_config;
netcode_default_client_config( &client_config );
Expand All @@ -9180,16 +9177,6 @@ void test_packet_tagging()

check( client );

// todo
printf( "server ipv4\n" );

struct netcode_server_config_t server_config;
netcode_default_server_config( &server_config );

struct netcode_server_t * server = netcode_server_create( server_address, &server_config, 0.0 );

check( server );

uint8_t connect_token[NETCODE_CONNECT_TOKEN_BYTES];

uint64_t client_id = 0;
Expand All @@ -9207,28 +9194,22 @@ void test_packet_tagging()
netcode_server_destroy( server );
}

/*
{
NETCODE_CONST char * server_address = "[::1]:40000";

struct netcode_server_config_t server_config;
netcode_default_server_config( &server_config );

// todo
printf( "server ipv6\n" );
struct netcode_server_t * server = netcode_server_create( "[::1]:40000", &server_config, 0.0 );
struct netcode_server_t * server = netcode_server_create( server_address, &server_config, 0.0 );

check( server );

struct netcode_client_config_t client_config;
netcode_default_client_config( &client_config );

// todo
printf( "client ipv6\n" );
struct netcode_client_t * client = netcode_client_create( "[::1]:50000", &client_config, 0.0 );

NETCODE_CONST char * server_address = "[::1]:40000";
check( client );

uint8_t connect_token[NETCODE_CONNECT_TOKEN_BYTES];

Expand All @@ -9246,7 +9227,6 @@ void test_packet_tagging()

netcode_server_destroy( server );
}
*/
}

#endif // #if NETCODE_PACKET_TAGGING
Expand Down

0 comments on commit 85cc4d0

Please sign in to comment.