예제 #1
0
파일: IPEndpointI.cs 프로젝트: externl/ice
 public IPEndpointI(ProtocolInstance instance, Ice.InputStream s)
 {
     instance_ = instance;
     host_ = s.readString();
     port_ = s.readInt();
     sourceAddr_ = null;
     connectionId_ = "";
     _hashInitialized = false;
 }
예제 #2
0
파일: EndpointI.cs 프로젝트: externl/ice
 internal EndpointI(Instance instance, Ice.InputStream s)
     : base(instance, s)
 {
     _instance = instance;
     _timeout = s.readInt();
     _compress = s.readBool();
 }
예제 #3
0
        private static void printRequest(System.IO.StringWriter s, Ice.InputStream str)
        {
            int requestId = str.readInt();
            s.Write("\nrequest id = " + requestId);
            if(requestId == 0)
            {
                s.Write(" (oneway)");
            }

            printRequestHeader(s, str);
        }
예제 #4
0
        private static void printReply(System.IO.StringWriter s, Ice.InputStream str)
        {
            int requestId = str.readInt();
            s.Write("\nrequest id = " + requestId);

            byte replyStatus = str.readByte();
            s.Write("\nreply status = " + (int)replyStatus + ' ');

            switch(replyStatus)
            {
            case ReplyStatus.replyOK:
            {
                s.Write("(ok)");
                break;
            }

            case ReplyStatus.replyUserException:
            {
                s.Write("(user exception)");
                break;
            }

            case ReplyStatus.replyObjectNotExist:
            case ReplyStatus.replyFacetNotExist:
            case ReplyStatus.replyOperationNotExist:
            {
                switch(replyStatus)
                {
                case ReplyStatus.replyObjectNotExist:
                {
                    s.Write("(object not exist)");
                    break;
                }

                case ReplyStatus.replyFacetNotExist:
                {
                    s.Write("(facet not exist)");
                    break;
                }

                case ReplyStatus.replyOperationNotExist:
                {
                    s.Write("(operation not exist)");
                    break;
                }

                default:
                {
                    Debug.Assert(false);
                    break;
                }
                }

                printIdentityFacetOperation(s, str);
                break;
            }

            case ReplyStatus.replyUnknownException:
            case ReplyStatus.replyUnknownLocalException:
            case ReplyStatus.replyUnknownUserException:
            {
                switch(replyStatus)
                {
                case ReplyStatus.replyUnknownException:
                {
                    s.Write("(unknown exception)");
                    break;
                }

                case ReplyStatus.replyUnknownLocalException:
                {
                    s.Write("(unknown local exception)");
                    break;
                }

                case ReplyStatus.replyUnknownUserException:
                {
                    s.Write("(unknown user exception)");
                    break;
                }

                default:
                {
                    Debug.Assert(false);
                    break;
                }
                }

                string unknown = str.readString();
                s.Write("\nunknown = " + unknown);
                break;
            }

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

            if(replyStatus == ReplyStatus.replyOK || replyStatus == ReplyStatus.replyUserException)
            {
                Ice.EncodingVersion v = str.skipEncapsulation();
                if(!v.Equals(Ice.Util.Encoding_1_0))
                {
                    s.Write("\nencoding = ");
                    s.Write(Ice.Util.encodingVersionToString(v));
                }
            }
        }
예제 #5
0
        private static byte printHeader(System.IO.StringWriter s, Ice.InputStream str)
        {
            try
            {
                str.readByte(); // Don't bother printing the magic number
                str.readByte();
                str.readByte();
                str.readByte();

                /* byte pMajor = */ str.readByte();
                /* byte pMinor = */ str.readByte();
                //s.Write("\nprotocol version = " + (int)pMajor + "." + (int)pMinor);

                /* byte eMajor = */ str.readByte();
                /* byte eMinor = */ str.readByte();
                //s.Write("\nencoding version = " + (int)eMajor + "." + (int)eMinor);

                byte type = str.readByte();
                s.Write("\nmessage type = " + (int)type + " (" + getMessageTypeAsString(type) + ')');

                byte compress = str.readByte();
                s.Write("\ncompression status = " + (int)compress + ' ');
                switch(compress)
                {
                case (byte)0:
                {
                    s.Write("(not compressed; do not compress response, if any)");
                    break;
                }

                case (byte)1:
                {
                    s.Write("(not compressed; compress response, if any)");
                    break;
                }

                case (byte)2:
                {
                    s.Write("(compressed; compress response, if any)");
                    break;
                }

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

                int size = str.readInt();
                s.Write("\nmessage size = " + size);
                return type;
            }
            catch(System.IO.IOException)
            {
                Debug.Assert(false);
                return 0;
            }
        }
예제 #6
0
        private static void printBatchRequest(System.IO.StringWriter s, Ice.InputStream str)
        {
            int batchRequestNum = str.readInt();
            s.Write("\nnumber of requests = " + batchRequestNum);

            for(int i = 0; i < batchRequestNum; ++i)
            {
                s.Write("\nrequest #" + i + ':');
                printRequestHeader(s, str);
            }
        }
예제 #7
0
 public TcpEndpointI(ProtocolInstance instance, Ice.InputStream s)
     : base(instance, s)
 {
     _timeout = s.readInt();
     _compress = s.readBool();
 }
예제 #8
0
 protected virtual void readImpl__(Ice.InputStream inS__)
 {
     inS__.startSlice();
     id__prop = inS__.readString();
     inS__.readObject(new Patcher__(minie.irpc.cm_node_rpc.ice_staticId(), this, 0));
     inS__.readObject(new Patcher__(minie.irpc.cm_user_rpc.ice_staticId(), this, 1));
     host_flag__prop = inS__.readInt();
     inS__.readObject(new Patcher__(minie.irpc.sys_user_rpc.ice_staticId(), this, 2));
     creation_time__prop = inS__.readString();
     inS__.endSlice();
 }
예제 #9
0
 protected virtual void readImpl__(Ice.InputStream inS__)
 {
     inS__.startSlice();
     id__prop = inS__.readInt();
     name__prop = inS__.readString();
     desc__prop = inS__.readString();
     inS__.endSlice();
 }
예제 #10
0
 protected override void readImpl__(Ice.InputStream inS__)
 {
     inS__.startSlice();
     errorCode = inS__.readInt();
     errorMessage = inS__.readString();
     inS__.endSlice();
 }
예제 #11
0
 protected virtual void readImpl__(Ice.InputStream inS__)
 {
     inS__.startSlice();
     id__prop = inS__.readString();
     username__prop = inS__.readString();
     cellphone__prop = inS__.readString();
     password__prop = inS__.readString();
     fullname__prop = inS__.readString();
     code__prop = inS__.readString();
     email__prop = inS__.readString();
     level__prop = inS__.readInt();
     inS__.readObject(new Patcher__(minie.irpc.sys_user_rpc.ice_staticId(), this));
     creation_time__prop = inS__.readString();
     user_groups__prop = minie.irpc.sys_group_rpc_listHelper.read(inS__);
     user_roles__prop = minie.irpc.sys_role_rpc_listHelper.read(inS__);
     inS__.endSlice();
 }