How to close a socket connection

Hi @ all,

I’m still stuggling with some tcp socket issues :confused:

I’m opening a socket connection to a server, sending some data. Works fine.
But, how to close this socket from the module’s (=client) side?
Haven’t found any info about that in the doc.

Just to mention, I’m running a Q2501 with OAT 3.10 and eDLib.

Tia,
Heinz

Hello Heinz,

I’m pretty sure that you close the socket by sending nothing from the client, so

err = ed_SendDataExt( "", 0, TRUE, ED_ID_TCPSOCKET_1 );

should do it.

Best Regards,
Jan

Hi Jan, thanks for the hint.
But maybe with a NULL instead of “”… Anyway, I’ll give it a try.

Thanks,
Heinz

NULL and empty string are different.
For that case I always used “”/empty string myself.

NULL isn’t “”, sure.

IMO the trick is sending a len=0.

I’ve given it a try, works also with NULL,0.

Heinz