Make 'port' a string in NET module

- avoids dependency on snprintf
- allows using "smtps" instead of "456" if desired
This commit is contained in:
Manuel Pégourié-Gonnard 2015-06-23 12:30:57 +02:00
parent e244f9ffc0
commit c0d749418b
16 changed files with 46 additions and 87 deletions

View file

@ -70,7 +70,7 @@ extern "C" {
*
* \note Sets the socket in connected mode even with UDP.
*/
int mbedtls_net_connect( int *fd, const char *host, int port, int proto );
int mbedtls_net_connect( int *fd, const char *host, const char *port, int proto );
/**
* \brief Create a receiving socket on bind_ip:port in the chosen
@ -89,7 +89,7 @@ int mbedtls_net_connect( int *fd, const char *host, int port, int proto );
* \note Regardless of the protocol, opens the sockets and binds it.
* In addition, make the socket listening if protocol is TCP.
*/
int mbedtls_net_bind( int *fd, const char *bind_ip, int port, int proto );
int mbedtls_net_bind( int *fd, const char *bind_ip, const char *port, int proto );
/**
* \brief Accept a connection from a remote client