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()); }
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()); }