Home/Support/Support Forum/After using sock_init() where can I find the parameter for sock_close(&?)
New and improved user forum site going live on 12/6 (All users will need to reset their password when the new forum is active)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

After using sock_init() where can I find the parameter for sock_close(&?)

0 votes
I am opening a smtp socket with sock_init and tries to use sock_close(?) after the e-mail has been tranfered.
The compiler requires a parameter for sock_close(?)
How will I find this? Example code SMTP_TLS.C were I put in sock_init() instead of sock_init_or_exit(1) and then sock_close(&?) in the end.
asked Jan 9, 2015 in Rabbit Software by Kenneth43 New to the Community (1 point)

Please log in or register to answer this question.

1 Answer

0 votes
You will close whatever socket you opened. See an example in serialexa.c

For instance, you declare

tcp_Socket socket;

You open it with

(tcp_open(socket,0,vs_info.dest_ip,vs_info.dest_port,NULL)

and close with

sock_close(socket);
answered Jan 9, 2015 by trooper2 Veteran of the Digi Community (591 points)
...