Ejemplo n.º 1
0
        public static byte[] MakePacket(IBuilderLite build, uint 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, uint flowId, int errorCode)
        {
            var data = build.WeakBuild();

            var bundle = new ServerBundle();

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

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