Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Connect to a SMTP Request time to a SNTP server.

Files

smtpsntp-c.h/smtpsntp-c.c

Prototype

 

Code Block
languagecpp
NET_SOCK_ID SMTPc_Connect (CPU_CHAR                *p_host_name,
						   CPU_INT16U               port,
 						   CPU_CHAR CPU_BOOLEAN  SNTPc_ReqRemoteTime (NET_SOCK_ADDR   server_ip,
              *p_username, 						   CPU_CHAR                *p_pwd,
 						   NET_APP_SOCK_SECURE_CFG *p_secure_cfg,
 						   SMTPc_ERR    SNTP_PKT           *p_err);*ppkt)

 

Arguments

p_host_name server         Pointer to host name of the SMTP server to connect. Can be also an IP address.port Socket address object describing the SNTP server to send the request.

ppkt                         TCP port to use, or '0' if SMTPc_DFLT_PORT.

p_username           Pointer to user name, if authentication enabled.

p_pwd                     Pointer to password, if authentication enabled.

p_secure_cfg         Pointer to the secure configuration (TLS/SSL).

p_err                       Pointer to variable that will receive the return error code from this function Pointer to the SNTP message packet to compute.

Returned Values

If the connect operation with the SMTP server time request is successful, the function will return the Socket descriptor/handle identifier associated to this connection.If the connect operation with the SMTP server is unsuccessful, the function will return -1. DEF_TRUE will be returned. 

If the time request failed, DEF_TRUE will be returned. 

Required Configuration

Module Configuration.

Notes / Warnings

...

none.

Example Usage

none.