I am working on a simple TCP server where multiple client will connect to it. The requirement was server will have multiple port and on each port we will connect the client. so a dedicated connection will be establish.
Now the code i have written works fine. but when
/* Create a task to look after it */
if (RTCS_detachsock(child_sock) == RTCS_OK)
result = _task_create(0, SERVER_C_TASK_0, child_sock);
if (result == MQX_NULL_TASK_ID)
printf("\nCould not create server child task.\n\r");
printf("\n accept() failed, error 0x%lx", RTCS_geterror(child_sock));
on excecution of the underline statement. i see output on terminal:
I'm waiting for connections ...
Error, accept() failed with error code 1704
Error, getpeername() failed with error code 1704
Client 0 is already connected.
now i am not able to decode the error code 1704.
like what exactly it meant. and what action should i take to avoid it.