Hi Vitalii,
recv and recvfrom are part of the TCP/IP stack standard. Callbacks cannot be hooked into the stack to handle cases where information is received.
[quote user="Vitalii Kukush"]
or I must periodically call recv with flags = MSG_DONTWAIT. Could You suggest any alternative method?
[/quote]
It is a common practice to not block waiting for data. This approach will require that your application be able to handle situations where the data is not received all at once (maintain a data buffer and count of bytes received, etc).
Thanks,
-- Emmanuel