mochi
ee081d0abe
Merge branch 'v1.2.0' of https://github.com/mochi-co/mqtt into fix-store-retained
2022-04-10 19:54:37 +01:00
mochi
45c4a64b87
Abandon client state if the existing client specified a cleansession
2022-04-10 19:07:46 +01:00
mochi
1bc01271cb
Store retained message based on corrected r value
2022-04-10 18:47:45 +01:00
mochi
eef3592576
clear buffers after deferred stop
2022-04-10 01:46:04 +01:00
mochi
70f52c8a3b
Refactor establishconnection to prevent same-id disconnects
2022-04-10 01:33:35 +01:00
mochi
429b72265a
refactor connSetup for clarity
2022-04-10 01:32:24 +01:00
mochi
f60d2dcfca
Clarify error messages
2022-04-10 01:32:04 +01:00
mochi
f218cde69c
Use defer to release buffers and decrease stats on any client closure
2022-04-09 20:53:28 +01:00
JB
9ea687eb94
Merge pull request #61 from mochi-co/server-options
...
Configurable Server Options
2022-04-09 20:29:23 +01:00
JB
949e4e2e91
Merge pull request #63 from mochi-co/add-drop-packet-error
...
Add ErrRejectPacket to OnProcessMessage
2022-04-09 20:29:03 +01:00
JB
515e0269de
Merge pull request #62 from mochi-co/fix-inflight-key
...
Fix Inflight Persistence Key
2022-04-06 11:23:51 +01:00
mochi
01d8a450d2
Ensure OnError is set before using it
2022-03-31 17:56:08 +01:00
mochi
56e8039093
Optionally drop a packet if the ErrRejectPacket error is returned from OnProcessMessage
2022-03-31 17:53:13 +01:00
mochi
7b9bc844c1
Add ErrRejectPacket error to abandon packet processing from OnMessageProcess
2022-03-31 17:52:40 +01:00
JB
8acb182820
Merge pull request #53 from stffabi/feature/onprocessmessage-event
...
Events: Add OnProcessMessage event
2022-03-31 17:41:22 +01:00
mochi
5726880095
fix inflight key reference
2022-03-31 17:36:03 +01:00
mochi
8e7098a32d
remove deprecated log message
2022-03-31 16:59:49 +01:00
mochi
a0060429d1
Add Server Options
...
Adds a new struct of server options which can be used to override default properties. A new options-accepting NewServer function has been created to supersede the New method, which is now deprecated.
2022-03-31 16:48:29 +01:00
stffabi
7b4e79707b
Events: Add OnProcessMessage event
...
This event gets called right after ACL checking but before any other
Fields of the packet get evaluated.
2022-03-21 10:11:29 +01:00
Joshua MacDonald
c6643592f6
Combines two fixes
2022-03-17 14:19:23 -07:00
stffabi
f5fc5e8c44
Subscribe: Only send retained messages if ACLs has allowed subscription to the topic
2022-03-17 09:25:29 +01:00
stffabi
1f86168d9d
Publish: Set the retain flag in the fixedheader ( #42 )
...
* Publish: Set the retain flag in the fixedheader
2022-03-16 18:12:07 +00:00
mochi
ab25083ed2
Merge branch 'master' of https://github.com/mochi-co/mqtt into v1.1.2
...
# Conflicts:
# server/internal/clients/clients.go
2022-03-16 18:09:00 +00:00
JB
3286d5a484
Replace Travis with Github Actions ( #41 )
...
* Remove Travis CI
* Add Github Actions Workflow
* Update badges for build status, coverage, report card, doc reference
* use actions for all pull requests and pushes
* test all files for coverage
* Apply gofmt -s to simplify code
* Fix typos
* Cleanup comments
* Cleanup comments
Co-authored-by: mochi <mochimou@icloud.com >
2022-03-15 19:56:42 +00:00
mochi
d6a92cc5bd
Add Keyed fields to events.Client for readability and go vet
2022-03-15 18:44:49 +00:00
mochi
325d44d478
Add missing method comments
2022-03-15 18:44:21 +00:00
Joshua MacDonald
0a5f6d3a9d
Add an OnError handler; report the reason for disconnects. ( #38 )
2022-03-15 17:59:52 +00:00
JB
6e16765f60
revert server version
2022-02-24 21:19:22 +00:00
JB
c8c0a5a094
Revert "added redis persistence mode"
2022-02-24 21:10:39 +00:00
JB
4a833dd081
Update server version
2022-02-24 21:07:54 +00:00
narwal
b6529f05d3
add redis persistence mode and example
2022-02-22 18:57:31 +08:00
mochi
7f76445cc8
update server version
2022-01-30 10:39:49 +00:00
mochi
eda03d4338
optimise Server struct
2022-01-30 10:30:34 +00:00
mochi
a60c96c889
Update comment for clarity
2022-01-28 21:04:15 +00:00
mochi
86e0a5827e
Update version to 1.1.0
2022-01-26 20:49:53 +00:00
Rob Kennedy
471ca00a64
Make atomics work on 32-bit systems
...
On 32-bit systems, `atomic` requires its 64-bit arguments to have 64-bit
alignment, but the compiler doesn't help ensure that's the case. In this
commit, fields that don't need to hold large numbers have been converted
to 32-bit types, which are always aligned correctly on all platforms.
For fields that may hold large numeric values, padding has been added to
get the necessary alignment, and tests have been added to avoid
regressions.
2022-01-25 00:22:26 -06:00
mochi
a2c0749640
Update server version to 1.0.5
2022-01-24 18:46:34 +00:00
mochi
d15ad682bf
Call OnDisconnect Event if applicable
2022-01-24 17:42:19 +00:00
mochi
a360ea6a6c
Call OnConnect Event if applicable
2022-01-24 17:37:11 +00:00
mochi
811ae0e1be
Prevent locks being copied by passing non-pointer to FromClient
2022-01-24 17:36:14 +00:00
mochi
0758bc961c
Add AllowClients check in publishToSubscribers
...
If AllowClients has been set on a packet, ensure only clients in the slice are sent the message
2022-01-14 17:02:31 +00:00
mochi
9d0ea957bb
Increment server version
2022-01-14 16:58:48 +00:00
mochi
fb136483d0
Revert server version
2022-01-10 23:50:40 +00:00
mochi
b209cd95f1
increment server version
2022-01-10 23:48:33 +00:00
mochi
a674632cce
Increment server version
2022-01-10 23:41:46 +00:00
mochi
b277600823
Increment server version to 1.0.1
2022-01-05 21:14:11 +00:00
mochi
8890bb9dd4
remove redundant code
2022-01-05 21:05:20 +00:00
mochi
c2a42a16ca
Merge OnMessage and OnMessageModify
2022-01-05 20:59:14 +00:00
mochi
d4cbf1abdc
Add Event Hooks
...
Adds basic event hooks (OnMessage, OnMessageModify) to the server using the new events library.
2022-01-05 20:38:00 +00:00
mochi
b5685ca0ee
update packets library import reference
2022-01-05 17:01:15 +00:00