예제 #1
0
        /// <summary>
        /// Получение состояния конвеера на сервере
        /// </summary>
        /// <returns></returns>
        public int[] GetState()
        {
            //Запрос серверу
            sendSocket.SendMessage(GetCommand, GetCommand.Length);
            //Получение ответа
            int sizeAnswer = 0;

            byte[] answer    = sendSocket.GetAnswer(out sizeAnswer);
            object answerObj = ConvertToObjThrow(answer);

            //Возвращение результатов
            return((Int32[])answerObj);
        }
예제 #2
0
        public void ErrorConnect()
        {
            SendSocket SendSocket = new SendSocket(address3, port3);

            try
            {
                SendSocket.SendMessage(new byte[] { 1, 2 }, 2);
            }
            catch
            {
                return;
            }

            Assert.Fail();
        }