コード例 #1
0
 public static unsafe string ReceiveText(this ZmqSocket socket, ZmqSendReceiveFlags flags = ZmqSendReceiveFlags.None, Encoding encoding = null)
 {
     using var result = new ZmqMessage();
     socket.Receive(result, flags);
     return((encoding ?? Encoding.UTF8).GetString((byte *)result.DangerousGetData(), result.Size));
 }
コード例 #2
0
 public static byte[] Receive(this ZmqSocket socket, ZmqSendReceiveFlags flags = ZmqSendReceiveFlags.None)
 {
     using var result = new ZmqMessage();
     socket.Receive(result, flags);
     return(result.ToArray());
 }