============================================================================ Protocol Header ============================================================================ writeHeader writes the Fory protocol header
(ctx *WriteContext, config Config)
| 801 | |
| 802 | // writeHeader writes the Fory protocol header |
| 803 | func writeHeader(ctx *WriteContext, config Config) { |
| 804 | var bitmap byte = 0 |
| 805 | if config.IsXlang { |
| 806 | bitmap |= XLangFlag |
| 807 | } |
| 808 | if ctx.outOfBand { |
| 809 | bitmap |= OutOfBandFlag |
| 810 | } |
| 811 | ctx.buffer.WriteByte_(bitmap) |
| 812 | } |
| 813 | |
| 814 | // readHeader reads and validates the Fory protocol header |
| 815 | // Sets error on ctx if header is invalid (use ctx.HasError() to check) |
no test coverage detected