mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Make 'port' a string in NET module
- avoids dependency on snprintf - allows using "smtps" instead of "456" if desired
This commit is contained in:
parent
e244f9ffc0
commit
c0d749418b
16 changed files with 46 additions and 87 deletions
|
|
@ -60,7 +60,7 @@ int main( void )
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#define SERVER_PORT 4433
|
||||
#define SERVER_PORT "4433"
|
||||
#define SERVER_NAME "localhost"
|
||||
#define GET_REQUEST "GET / HTTP/1.0\r\n\r\n"
|
||||
|
||||
|
|
@ -132,8 +132,7 @@ int main( void )
|
|||
/*
|
||||
* 1. Start the connection
|
||||
*/
|
||||
mbedtls_printf( " . Connecting to tcp/%s/%4d...", SERVER_NAME,
|
||||
SERVER_PORT );
|
||||
mbedtls_printf( " . Connecting to tcp/%s/%s...", SERVER_NAME, SERVER_PORT );
|
||||
fflush( stdout );
|
||||
|
||||
if( ( ret = mbedtls_net_connect( &server_fd, SERVER_NAME,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue