This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200SDK: How to know number f sockets open in cc3200 SDK

Part Number: CC3200SDK
Other Parts Discussed in Thread: CC3200

May i know is their any way to know number of sockets open at given point of time using  CC3200 SDK.

  • Hi,

    There no API for such purpose at CC3200 host driver. You can count number of socket by yourself when you using (sl_Open and sl_Close API) but your will not be able determine whether socket was closed by opposite side.

    Why you need to count number of opened sockets?

    Jan

  • I was getting SL_ESECT00MANYSSLOPENED error when i was trying for new socket connection .i want to check the Number of open connections before i call for new socket connection .

  • Hi,

    CC3200 supports up to 8 sockets. Two of them can be secured (SSL/TLS).

    If you need more sockets, you should cosier to use CC3220 (16/6) or CC3235/CC3230 device (16/16). CC3220/CC3235 supports also linger option for closing socket, which allow to better management of sockets.

    update: But if you want to stay with CC3200 device, reasonable way how to overcome issue with number of secured sockets is to wait 10sec before opening new secured socket after calling sl_Close() API. This will be enough time for closing socket by timeout even secured socket was not closed by opposite side.

    Jan

  • Hi Linga,

    I agree with Jan's answer, but I also wanted to add that the SL_ESECTOOMANYSSLOPENED error is not fatal. You can check for this error when you create a new socket, and then wait for a few seconds before trying again.

    Best regards,

    Sarah

  • Thank you very much for the response .Yes the issue was resolved , if i call the new socket after 2secs.