hi, i have successfully created the server code where i created a socket on the port and put it on listen mode. If any connection comes on this port the a new child socket with same properties is created and connection is establish. but i don't want this socket to connect with child socket, i.e. it should connect to parent socket and should not create a child socket for it. as in my code i have such 13 port and socket, so the memory usages goes to the limit and the code stops working or after connecting +5 ports other ports cannot make any connection and no data txrx is possible in this ports. Please help me understand and solve this problem. Regards, Swapnil K.
Hi Swapnil Karte,
I am surprised, but the “backlog” parameter of listen(s, backlog) is not implemented and ignored by RTCS. It is proved by source code and documentation.
So you cannot directly control number of pending connections.
I will make proposal to add the missing implementation to RTCS.
Hi Andrey, Sorry but i am not able to follow what you wanna convey. according to the MQXRTSCUG.pdf "Freescale MQX™ RTCS™ User’s Guide, Rev. 8" page 211. Not any more information is given for “backlog” parameter of Listen. i referred example of pg 108. there also the parameter is kept 0. So according to ur proposal the RTCS is incomplete stack, which i should make in observation to my FAE to take care of it? or my code is incomplete? Please elaborate more on this. Regards, Swapnil K.
Andery i feel this listen() is solly written for the HTTPD stack inside the RTCS_library. so it is possible to make a http_webserver where we need one port(80) and a possible of around 40 sockets can be open on it. which indeed is quite a good number for an Embedded Server.