Example #1
0
        // ---------------------
        // ----- INTERNALS -----
        // ---------------------

        private static InternalPacket NewInternalPacket <TSend>(int msgId, int options, string fullName, Marshaller <TSend> marshaller, TSend request)
        {
            InternalPacket packet = InternalPacket.Create();

            packet.MsgId          = msgId;
            packet.FullMethodName = fullName ?? "";
            packet.Options        = options;
            packet.Payload        = marshaller.Serializer(request);
            return(packet);
        }
Example #2
0
        private static InternalPacket NewInternalPacket(int msgId, int options, string fullName = null, RpcException exception = null)
        {
            InternalPacket packet = InternalPacket.Create();

            packet.MsgId          = msgId;
            packet.FullMethodName = fullName ?? "";
            packet.Options        = options;

            if (exception != null)
            {
                packet.Exception = exception;
            }

            return(packet);
        }