Hi I can't fix the issue in OnLoginSuccess() pubSocket.SendMoreFrame("TopicA").SendFrame("Hello");
variable due to error
the name '' does not exist in the current context.
I know that I need to change variable to public but when I add
static public PublisherSocket pubSocket = new PublisherSocket();
at the beggining of the class the code doues not work properly.
Also, the problem is that I need to set some options (.Options, .Bind) in Main().
using System;
using System.Threading;
using NetMQ;
using NetMQ.Sockets;
namespace Publisher
{
class Program
{
static public void OnLoginSuccess()
{
pubSocket.SendMoreFrame("TopicA").SendFrame("Hello");
}
static void Main(string[] args)
{
using (var pubSocket = new PublisherSocket())
{
pubSocket.Options.SendHighWatermark = 1000;
pubSocket.Bind("tcp://localhost:12345");
}
OnLoginSuccess();
}
}
}