Beispiel #1
0
        public void Send(IcapResponseMessage message)
        {
            string messageString = message.ToString();

            Console.WriteLine($"Response sent: {messageString}");

            byte[] messageBytes = Encoding.ASCII.GetBytes(messageString);

            Socket.Send(messageBytes);
        }
        IcapResponseMessage GetConfigurationResponse()
        {
            IcapResponseMessage message = new IcapResponseMessage();

            message.Headers["Methods"]      = string.Join(", ", this.config.SupportedMessageTypes);
            message.Headers["Service"]      = this.config.Service;
            message.Headers["Encapsulated"] = "null-body=0";

            message.StatusCode = IcapStatusCode.OK;

            return(message);
        }