Closed metadings closed 10 years ago
Hell I got it, I recreated the ReceivedMessage delegate every while.
Someone maintaining this project, please add the following named fields to the NanomsgSymbol class:
namespace NNanomsg
{
public static class NanomsgSymbols
{
//...
public static readonly int
NN_NS_NAMESPACE,
NN_NS_VERSION,
NN_NS_DOMAIN,
NN_NS_TRANSPORT,
NN_NS_PROTOCOL,
NN_NS_OPTION_LEVEL,
NN_NS_SOCKET_OPTION,
NN_NS_TRANSPORT_OPTION,
NN_NS_OPTION_TYPE,
NN_NS_FLAG,
NN_NS_ERROR,
NN_NS_LIMIT,
NN_TYPE_NONE,
NN_TYPE_INT,
NN_TYPE_STR,
NN_UNIT_NONE,
NN_UNIT_BYTES,
NN_UNIT_MILLISECONDS,
NN_UNIT_PRIORITY,
NN_UNIT_BOOLEAN,
NN_SOCKET_NAME,
// ...
Hello World,
I have a REPly setup like this (broken down):
The core of this is, that the while is cancelable with a CancellationTokenSource, and the nanoListener polls every while for a second.
Now the problem (besides missing some named fields in NanomsgSymbols when using Send/ReceiveStreamImmediate) is, that the ReceivedMessage delegate is often called but ReceiveStreamImmediate returns null (and the non-Immediate methods block forever).
Why is the delegate called, when there is no message anymore?