make kestrel a tak server, so that it can send and receive pois as cots data
Some checks failed
ci/woodpecker/pr/pr Pipeline failed
Some checks failed
ci/woodpecker/pr/pr Pipeline failed
This commit is contained in:
12
server/utils/cotRouter.js
Normal file
12
server/utils/cotRouter.js
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* CoT stream first-byte detection: TAK Protocol (0xBF) or traditional XML (0x3C '<').
|
||||
* Used by tests and any code that must distinguish CoT from other protocols.
|
||||
*/
|
||||
|
||||
export const COT_FIRST_BYTE_TAK = 0xBF
|
||||
export const COT_FIRST_BYTE_XML = 0x3C
|
||||
|
||||
/** @param {number} byte - First byte of stream. @returns {boolean} */
|
||||
export function isCotFirstByte(byte) {
|
||||
return byte === COT_FIRST_BYTE_TAK || byte === COT_FIRST_BYTE_XML
|
||||
}
|
||||
Reference in New Issue
Block a user