You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have met at least three times, when the program is running a few days later, the client program or Server program using (ZmqContext) = ZmqContext.Create (context) will be stuck, I need to restart the server to work properly
This is my code
Server:
using (ZmqContext context = ZmqContext.Create())
using (ZmqSocket server = context.CreateSocket(SocketType.REP))
{
server.Bind("tcp://*:9800");
while (true)
{
.....
}
}
Client:
using (ZmqContext context = ZmqContext.Create())
using (ZmqSocket client = context.CreateSocket(ZeroMQ.SocketType.REQ))
{
client.ReceiveTimeout = new TimeSpan(0, 0, 30);
client.Connect("tcp://127.0.0.1:9800" );
string con ="...";
client.Send(con, System.Text.Encoding.Unicode);
string Recv = client.Receive(System.Text.Encoding.Unicode);
.....
}
The text was updated successfully, but these errors were encountered:
I have met at least three times, when the program is running a few days later, the client program or Server program using (ZmqContext) = ZmqContext.Create (context) will be stuck, I need to restart the server to work properly
This is my code
Server:
using (ZmqContext context = ZmqContext.Create())
using (ZmqSocket server = context.CreateSocket(SocketType.REP))
{
server.Bind("tcp://*:9800");
while (true)
{
.....
}
}
Client:
using (ZmqContext context = ZmqContext.Create())
using (ZmqSocket client = context.CreateSocket(ZeroMQ.SocketType.REQ))
{
client.ReceiveTimeout = new TimeSpan(0, 0, 30);
client.Connect("tcp://127.0.0.1:9800" );
string con ="...";
client.Send(con, System.Text.Encoding.Unicode);
string Recv = client.Receive(System.Text.Encoding.Unicode);
.....
}
The text was updated successfully, but these errors were encountered: