mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Simplify net_accept() with UDP sockets
This is made possible by the new API where net_accept() gets a pointer to bind_ctx, so it can update it.
This commit is contained in:
parent
db2468d7aa
commit
abc729e664
6 changed files with 26 additions and 48 deletions
|
|
@ -273,13 +273,6 @@ reset:
|
|||
goto exit;
|
||||
}
|
||||
|
||||
/* With UDP, bind_fd is hijacked by client_fd, so bind a new one */
|
||||
if( ( ret = mbedtls_net_bind( &listen_fd, NULL, "4433", MBEDTLS_NET_PROTO_UDP ) ) != 0 )
|
||||
{
|
||||
printf( " failed\n ! mbedtls_net_bind returned -0x%x\n\n", -ret );
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* For HelloVerifyRequest cookies */
|
||||
if( ( ret = mbedtls_ssl_set_client_transport_id( &ssl,
|
||||
client_ip, cliip_len ) ) != 0 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue