Example #1
0
        private static void PrintRequestHeader(System.IO.StringWriter s, Ice.InputStream str)
        {
            PrintIdentityFacetOperation(s, str);

            try
            {
                byte mode = str.ReadByte();
                s.Write("\noperation mode = " + (int)mode + ' ');
                switch (mode)
                {
                case 0:
                {
                    s.Write("(non-idempotent)");
                    break;
                }

                case 1:
                {
                    s.Write("(idempotent/nonmutating)");
                    break;
                }

                case 2:
                {
                    s.Write("(idempotent)");
                    break;
                }

                default:
                {
                    s.Write("(unknown)");
                    break;
                }
                }

                int sz = str.ReadSize();
                s.Write("\ncontext = ");
                while (sz-- > 0)
                {
                    string key = str.ReadString();
                    string val = str.ReadString();
                    s.Write(key + '/' + val);
                    if (sz > 0)
                    {
                        s.Write(", ");
                    }
                }

                Ice.Encoding v = str.SkipEncapsulation();
                s.Write("\nencoding = ");
                s.Write(v.ToString());
            }
            catch (System.IO.IOException)
            {
                Debug.Assert(false);
            }
        }
Example #2
0
        private static void PrintReply(System.IO.StringWriter s, Ice.InputStream str)
        {
            int requestId = str.ReadInt();

            s.Write("\nrequest id = " + requestId);

            var replyStatus = (ReplyStatus)str.ReadByte();

            s.Write($"\nreply status = {replyStatus}");

            if (replyStatus == ReplyStatus.OK || replyStatus == ReplyStatus.UserException)
            {
                Ice.Encoding v = str.SkipEncapsulation();
                s.Write("\nencoding = ");
            }
        }
Example #3
0
        private int _hashCode = 0; // 0 is a special value that means not initialized.

        public OpaqueEndpointI(List <string> args)
        {
            _type        = (EndpointType)(short)-1;
            _rawEncoding = Ice.Encoding.V1_1;
            _rawBytes    = System.Array.Empty <byte>();

            InitWithOptions(args);

            if ((short)_type < 0)
            {
                throw new FormatException($"no -t option in endpoint {this}");
            }
            if (_rawBytes.Length == 0)
            {
                throw new FormatException($"no -v option in endpoint {this}");
            }
        }
Example #4
0
 public InfoI(EndpointType type, Ice.Encoding rawEncoding, byte[] rawBytes) :
     base(null, -1, false, rawEncoding, rawBytes) => _type = type;
Example #5
0
 public OpaqueEndpointI(EndpointType type, Ice.Encoding encoding, byte[] rawBytes)
 {
     _type        = type;
     _rawEncoding = encoding;
     _rawBytes    = rawBytes;
 }