ed_SocketSetConfig, passing pointer as 2nd parameter

Hello,

I could not figure out from the documentation what the implication of passing the “Params” parameter by reference is. If I use several Socket connections at the same time, will I need to dedicate an ed_SocketSetupParams_t variable for each active connection or is the passed configuration remembered inside the edLib. In other words, do I need to keep the data until the socket connection is closed, or may I release the memory immediately after the ed_SocketSetConfig call returns?

Thanks for any insights!

Jan

Hello,

According to me, its possible to reuse or delete the structure after calling the ed_SocketSetConfig.

I stepped into the routine (ed_SocketSetConfig) and looked at the assembler code that I don’t have C-source to (Wavecom code in wm_socket.c) and it looks like the routine is just checking the validity of the structure and then copying it to memory, so it looks like the user data in the structure is not important after the call.

The second argument for my theory is that the routines are “Set” and “Get” (ed_SocketSetConfig and ed_SocketGetConfig) and this should also imply that the data in the application structure (ed_SocketSetupParams_t) are not important after the Config call.

And as you wrote…

…there’s nothing in the documentation that indicate that its important to keep the data in its allocated structure.

Note: I know you are referring to V3.02 so you should know that my comments are based on V2.10 since I’m currently back in the “old” code to do some maintenance.

/Snoooze

Thanks so much for your answer!

Jan