26 Commits

Author SHA1 Message Date
Ivan Kozlovic
d963c7d71e [UPDATED] Compression library for Websocket (#1259)
Signed-off-by: Derek Collison <derek@nats.io>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Co-authored-by: Derek Collison <derek@nats.io>
2023-05-03 17:31:11 +02:00
Piotr Piotrowski
32b9daa3d2 [ADDED] Service api improvements (#1160)
Co-authored-by: Tomasz Pietrek <melgaer@gmail.com>
2022-12-20 12:52:16 +01:00
Phil Pennock
bf1b00513e Spelling fixes, mostly comments
The new `gospel` tool, <https://github.com/kortschak/gospel>, uses hunspell
libraries but pre-registers as acceptable words every symbol from the Go
source, massively reducing the noise and making comment spell-checking a
tractable problem.  It recently gained support for a `.words` file located in
the same directory as the `go.mod` file, to define local words.  With this, we
can fix real issues too.

This PR reduces the complaints down to 4:
 1. A reference to `syncSubscribers` which I can't figure out
 2. A reference to a `pubArg`
 3. Two references to `splitArgs`.

I made two actual code changes:
 1. Fixing a **non-exported** const type for consistency with all the others:
    `apiStreamList` -> `apiStreamListT`.
 2. Changing an error message to refer to a field which exist

Lots of typo fixes; references to since-renamed fields; etc.

A reference to `PublishAsynMsg` might have been intended to be
`PublishAsyncMsg` but that doesn't exist either, so I removed it.
Similarly, `SubjectIsDelivery` lived briefly but a stale reference was left in
a comment, so I removed that.

To reproduce:

    go install github.com/kortschak/gospel@latest
    gospel .
2022-02-05 21:26:46 -05:00
ken
9b7c017a39 reset msgCopied flag in parseState after processMsg() for consistency 2021-08-06 10:13:43 +08:00
Endeavourken
f8662df2ee avoid unnecessary data copy in processMsg 2021-08-05 10:27:50 +08:00
Derek Collison
eb0f6c78d7 Fix to reset hdr in msgArg as well
Signed-off-by: Derek Collison <derek@nats.io>
2020-05-30 14:07:59 -07:00
Derek Collison
6512038e73 Added generic header support
This is meant to mirror HTTP headers as much as possible for interop not only between our clients but HTTP clients in general. I actually used the http.Header directly, so we get canonical names, etc.

I thought about adding in a way to add the data field to a message such that you could detect mime-type and content-length etc. But Go's builtin type detection is not that good, so stuck with basics.

Signed-off-by: Derek Collison <derek@nats.io>
2020-05-26 05:13:55 -07:00
Ivan Kozlovic
2d143a7198 [FIXED] Bump default max control size to 4K
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-05-06 11:56:20 -06:00
Derek Collison
2f0e8883ae CNCF, move to Apache 2 2018-03-17 13:36:48 -07:00
Sotiris Salloumis
f8a4099a9c Fix of date on copyright 2017-05-19 20:04:36 +02:00
Ivan Kozlovic
a73f86b517 Fixed INFO split parsing
Added test for split buffer when processing INFO protocol
2016-08-01 13:19:30 -06:00
Ivan Kozlovic
6db5372cae [ADDED] Support for processing of asynchronous INFO protocols
This would be used in conjunction with server's PR #314.
The client may receive INFO protocols with a field containing
a possible array of URLs that correspond to server addresses in
the full mesh cluster that clients can connect to.
The server pool is updated with these URLs.
3 new Options and 2 new Options setters have been introduced to
manage username/password and/or tokens when dealing with these
bare URLs.

cc /derekcollison
2016-08-01 12:27:39 -06:00
Ivan Kozlovic
9a0abce686 Fix parser bug introduced in #139
- Used from 'scratch' field
- Improve test to check for msg content
2016-01-28 13:46:29 -07:00
Ivan Kozlovic
ee71d7681c Optimize for lager messages.
This was already present in the server.
2016-01-27 13:03:01 -07:00
Ivan Kozlovic
68053d80f9 Fix parser to check for missing sid.
Adding tests for code coverage, I discovered that we would not check for
missing sid (sid would be -1 due to parseInt64). I believe sid is
mandatory.
2016-01-27 11:48:59 -07:00
Derek Collison
6c5b8c0678 Merge pull request #55 from lloydde/rm-unused-op-connect
parser: rm unused OP_CONNECT & CONNECT_ARG.
2016-01-20 05:25:36 -07:00
Hari haran
4c150337fa remove duplicate package comment 2015-08-06 16:25:33 +05:30
Lloyd Dewolf
6cdf97df9a parser: rm unused OP_CONNECT & CONNECT_ARG. 2015-03-15 22:21:12 -07:00
Derek Collison
fefc40442c Minor cleanup, version bump 2014-11-02 17:30:27 +01:00
Derek Collison
e8a0320895 Updated copyright 2013-06-12 00:19:48 -07:00
Derek Collison
9851b2ba63 Merge branch 'master' of https://github.com/apcera/nats 2013-06-10 23:21:58 -07:00
Derek Collison
c2b1f139b5 Bad comment 2013-06-10 22:24:58 -07:00
Austin Vance and Tim Labeeuw
1d0645f9cf Formatted 2013-05-23 10:36:01 -07:00
Derek Collison
694f748e1c Added proper parsing for server PINGs 2013-02-05 17:37:14 -08:00
Derek Collison
efdd0b3f29 fixups 2012-12-19 11:03:35 -08:00
Derek Collison
2245b1460c Faster protocol parsing.
Added hand-coded parser for performance.
2012-12-17 16:00:16 -08:00