Beispiel #1
0
        /// <summary>
        /// General method for sending messages. Sends single message to server and waits for any responses.
        /// </summary>
        /// <param name="message">XmlMessage to be sent.</param>
        /// <returns>All received messages as XMLDocuments.</returns>
        protected List<MessagePackage> SendMessage(IClusterMessage message)
        {
            var tcpClient = new ConnectionClient(ServerInfo);

            tcpClient.Connect();

            var responses = tcpClient.SendAndWaitForResponses(message);

            tcpClient.Close();

            return responses;
        }