module NATS::Protocol
Defined in:
nats/protocol.crnats/protocol/exceptions.cr
nats/protocol/parser.cr
Constant Summary
-
CR_LF =
"\r\n" -
EMPTY_MESSAGE =
"" -
ERR =
/\A-ERR\s+('.+')?\r\n/i -
INFO =
/\AINFO\s+([^\r\n]+)\r\n/i -
MSG =
/\AMSG\s+([^\s]+)\s+([^\s]+)\s+(?:([^\s]+)[^\S\r\n]+)?(\d+)\r\n/i -
TODO Replace regexp to increase performance
-
OK =
/\A\+OK\s*\r\n/i -
PING =
/\APING\s*\r\n/i -
PING_COMMAND =
"PING#{CR_LF}" -
PONG =
/\APONG\s*\r\n/i -
UNKNOWN =
/\A(.*)/