예제 #1
0
        public void SendBots(IList <IBot> botList)
        {
            if (!IsConnected)
            {
                return;
            }

            var message = new NetMQMessage();

            message.Append("EasyErgsocket");

            foreach (IBot bot in botList)
            {
                using (var buffer = new System.IO.MemoryStream())
                {
                    Serializer.Serialize(buffer, bot.GetErg());
                    message.Append(buffer.ToArray());
                }
            }

            pubSocket.TrySendMultipartMessage(message);
        }