Ejemplo n.º 1
0
        public static byte[] MakePacket(IBuilderLite build, byte flowId)
        {
            var data = build.WeakBuild();

            var bundle = new ServerBundle();

            bundle.newMessage(data.GetType());
            bundle.flowId = flowId;
            bundle.writePB(data);

            return(bundle.stream.getbuffer());
        }
Ejemplo n.º 2
0
        public static byte[] sendImmediateError(IBuilderLite build, byte flowId, byte errorCode)
        {
            var data = build.WeakBuild();

            var bundle = new ServerBundle();

            bundle.newMessage(data.GetType());
            bundle.flowId = flowId;
            bundle.writePB(data, errorCode);

            return(bundle.stream.getbuffer());
        }