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