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.

[TCP] What happen between DaemonNew() and dtask_tcp_echo() ?

Hi there!

I need to understand something I really don't get.

In every network example, the file client.c contains this line:

hEcho = DaemonNew( SOCK_STREAMNC, 0, 7, dtask_tcp_echo,
OS_TASKPRINORM, OS_TASKSTKNORM, 0, 3 );

and in another file, the dtask_tcp_echo function is declared:

int dtask_tcp_echo( SOCKET s, UINT32 unused )

Here is my question: what happen in the code when a client connect to this socket? What is the process between the physical connection and actually entering the dtask_tcp_echo() function? 

Thanks in advance,

Regards,

Arnaud