Hi, I have a DealerSocket (it is a child of NetMQSocket).
And I want to use TryReceiveMultipartMessage method with cancellationToken.
This extension method uses "TryReceive" method.
if (!socket.TryReceive(ref msg, timeout))
TryReceive uses private field m_socketHandle to call "TryRecv" without cancellationToken.
m_socketHandle.TryRecv(ref msg, timeout);
So ideally we can just overload the NetMQSocket::TryReceive and pass cancellationToken.
And create additional extension method TryReceiveMultipartMessage to use cancellationToken as well.
Is it a bad idea or somebody knows another way how to terminate TryReceiveMultipartMessage?
Because even if I dispose the socket - it does not interrupt the method immediately.
Hi, I have a DealerSocket (it is a child of NetMQSocket). And I want to use TryReceiveMultipartMessage method with cancellationToken. This extension method uses "TryReceive" method.
if (!socket.TryReceive(ref msg, timeout))
TryReceive uses private field
m_socketHandle
to call "TryRecv" without cancellationToken.m_socketHandle.TryRecv(ref msg, timeout);
CancellationToken logic was implemented in https://github.com/zeromq/netmq/pull/876
So ideally we can just overload the
NetMQSocket::TryReceive
and pass cancellationToken. And create additional extension method TryReceiveMultipartMessage to use cancellationToken as well. Is it a bad idea or somebody knows another way how to terminate TryReceiveMultipartMessage? Because even if I dispose the socket - it does not interrupt the method immediately.