Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

CC3200MOD: TCP server with many TCP clients -- what socket logic?

$
0
0

Part Number:CC3200MOD

I'm running a server that needs to accept short TCP/IP messages (120 bytes) from numerous clients in a short period of time received by the server.  I need one message each sent by 15 different CC3200 units in a 40mS period. 

I'm basing my code on the example\tcp_socket    BsdTcpServer() function

The code in tcp_socket example uses two sockets, if I understand this correctly.  It never closes the sockets after sl_Accept() gets >=0 result until the demo is completed and 1000 messages are transacted.

        iNewSockID = sl_Accept(iSockID, ( struct SlSockAddr_t *)&sAddr,
                                (SlSocklen_t*)&iAddrSize);


I think my process would want to do sl_Close(iNewSockID) after each message is properly received, and then I'd call sl_Accept() again.
Will this work?  Or will I get a MAX_CONCURRENT_ACTIONS starvation if I do this?
Is there any reason I should close out the sl_Socket() using sl_Close(iSockID);  between successful receives?  

Is this throughput possible using CC3200MOD devices for the server and the 15 clients? 

Is there any reason I should ever call sl_Close(iSockID); if this process will repeat once a second or so?  If I did close out sl_Socket, is there any rate by which this process could restart so I wont run out of sockets? 

Does MAX_CONCURRENT_ACTIONS have any play in how many sockets can be open at a time?

Since I am running and debugging this on a CC3200MOD, is there any equivalent to g_pCB structure available I can look at during debug?  I think that structure comes with the code I'd use with a CC3100 and compiling the driver on my own CPU.  I don't see it in the CC3200MOD debugging. 

Thanks for any help!


Viewing all articles
Browse latest Browse all 262198

Trending Articles