Liu Song’s Projects


~/Projects/mqtt-go

git clone https://code.lsong.org/mqtt-go

Commit

Commit
ae3f72f677c572772a976e45c2f5c8b68382efcb
Author
JB <28275108+[email protected]>
Date
2023-07-31 13:26:26 +0100 +0100
Diffstat
 LICENSE.md | 3 +
 README.md | 38 ++++++++++++++++--------------
 clients.go | 4 +-
 clients_test.go | 6 ++--
 cmd/main.go | 8 +++---
 examples/auth/basic/main.go | 8 +++---
 examples/auth/encoded/main.go | 8 +++---
 examples/benchmark/main.go | 8 +++---
 examples/debug/main.go | 10 ++++----
 examples/hooks/main.go | 9 +++----
 examples/paho.testing/main.go | 8 +++---
 examples/persistence/badger/main.go | 10 ++++----
 examples/persistence/bolt/main.go | 10 ++++----
 examples/persistence/redis/main.go | 10 ++++----
 examples/tcp/main.go | 8 +++---
 examples/tls/main.go | 8 +++---
 examples/websocket/main.go | 7 +++--
 go.mod | 2 
 hooks.go | 8 +++---
 hooks/auth/allow_all.go | 6 ++--
 hooks/auth/allow_all_test.go | 5 ++-
 hooks/auth/auth.go | 6 ++--
 hooks/auth/auth_test.go | 6 ++--
 hooks/auth/ledger.go | 6 ++--
 hooks/auth/ledger_test.go | 5 ++-
 hooks/debug/debug.go | 7 +++--
 hooks/storage/badger/badger.go | 10 ++++---
 hooks/storage/badger/badger_test.go | 9 ++++---
 hooks/storage/bolt/bolt.go | 10 ++++---
 hooks/storage/bolt/bolt_test.go | 9 ++++---
 hooks/storage/redis/redis.go | 9 ++++---
 hooks/storage/redis/redis_test.go | 9 ++++---
 hooks/storage/storage.go | 5 ++-
 hooks/storage/storage_test.go | 5 ++-
 hooks_test.go | 8 ++++--
 inflight.go | 4 +-
 inflight_test.go | 4 +-
 listeners/http_healthcheck.go | 2 
 listeners/http_healthcheck_test.go | 1 
 listeners/http_sysinfo.go | 4 +-
 listeners/http_sysinfo_test.go | 4 +-
 listeners/listeners.go | 2 
 listeners/listeners_test.go | 2 
 listeners/mock.go | 2 
 listeners/mock_test.go | 2 
 listeners/net.go | 2 
 listeners/tcp.go | 2 
 listeners/tcp_test.go | 2 
 listeners/unixsock.go | 2 
 listeners/unixsock_test.go | 2 
 listeners/websocket.go | 2 
 listeners/websocket_test.go | 2 
 packets/codec.go | 2 
 packets/codec_test.go | 2 
 packets/codes.go | 2 
 packets/codes_test.go | 0 
 packets/fixedheader.go | 2 
 packets/fixedheader_test.go | 2 
 packets/packets.go | 2 
 packets/packets_test.go | 1 
 packets/properties.go | 2 
 packets/properties_test.go | 1 
 packets/tpackets.go | 2 +
 packets/tpackets_test.go | 1 
 server.go | 12 +++++----
 server_test.go | 16 ++++++++----
 system/system.go | 2 
 topics.go | 4 ++
 topics_test.go | 4 +-

migrate imports, copyrights, etc (#270)


diff --git a/LICENSE.md b/LICENSE.md
index 76bc5417b827ce33b90f50a23295ede0a6bb9ac1..25718aceb6ad7b10082d1d85b59f32070a70d7ea 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,7 +1,8 @@
 
 The MIT License (MIT)
 
-Copyright (c) 2019, 2022 Jonathan Blake (mochi-co)
+Copyright (c) 2023 Mochi-MQTT Organisation
+Copyright (c) 2019, 2022, 2023 Jonathan Blake (mochi-co)
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal




diff --git a/README.md b/README.md
index 50745305ef4070d0ea4fe08f61f732152beb9cd0..b26dfbaca4a5dfbe7e144a7bfe314cd11b5bddd3 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,15 @@
 
 <p align="center">
 
+![build status](https://github.com/mochi-mqtt/server/actions/workflows/build.yml/badge.svg) 
+    - Send and Receive QoS Flow Control Quotas
 ![build status](https://github.com/mochi-co/mqtt/actions/workflows/build.yml/badge.svg) 
+    - Send and Receive QoS Flow Control Quotas
 [![Coverage Status](https://coveralls.io/repos/github/mochi-co/mqtt/badge.svg?branch=master&v2)](https://coveralls.io/github/mochi-co/mqtt?branch=master)
+    - Send and Receive QoS Flow Control Quotas
 [![Go Report Card](https://goreportcard.com/badge/github.com/mochi-co/mqtt)](https://goreportcard.com/report/github.com/mochi-co/mqtt/v2)
+    - Send and Receive QoS Flow Control Quotas
 [![Go Reference](https://pkg.go.dev/badge/github.com/mochi-co/mqtt.svg)](https://pkg.go.dev/github.com/mochi-co/mqtt/v2)
-[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/mochi-co/mqtt/issues)
 
 </p>
 
@@ -24,6 +29,7 @@
 Don't forget to use the new v2 import paths:
 ```go
 <p align="center">
+| listeners.NewHTTPStats       | An HTTP $SYS info dashboard                                                                  |
 ```
 
 - Full MQTTv5 Feature Compliance, compatibility for MQTT v3.1.1 and v3.0.0:
@@ -58,7 +64,7 @@
 Support for MQTT v3.0.0 and v3.1.1 is considered hybrid-compatibility. Where not specifically restricted in the v3 specification, more modern and safety-first v5 behaviours are used instead - such as expiry for inflight and retained messages, and clients - and quality-of-service flow control limits.
 
 ## Roadmap
-- Please [open an issue](https://github.com/mochi-co/mqtt/issues) to request new features or event hooks!
+- Please [open an issue](https://github.com/mochi-mqtt/server/issues) to request new features or event hooks!
 - Cluster support.
 - Enhanced Metrics support.
 - File-based server configuration (supporting docker).
@@ -87,10 +93,10 @@ ``` go
 import (
   "log"
 
-[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/mochi-co/mqtt/issues)
+  "github.com/mochi-mqtt/server/v2"
+    - Server-side Disconnect and Auth Packets
-[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/mochi-co/mqtt/issues)
+    - Server-side Disconnect and Auth Packets
 
-  "github.com/mochi-co/mqtt/v2/listeners"
 )
 
 func main() {
@@ -161,21 +167,18 @@ Hooks are stackable - you can add multiple hooks to a server, and they will be run in the order they were added. Some hooks modify values, and these modified values will be passed to the subsequent hooks before being returned to the runtime code.
 
 | Type | Import | Info |
 | -- | -- |  -- |
-
+    - Server-side Disconnect and Auth Packets
 <p align="center">
-
-| Access Control | [mochi-co/mqtt/hooks/auth . Auth](hooks/auth/auth.go) | Rule-based access control ledger.  | 
+| Access Control | [mochi-mqtt/server/hooks/auth . Auth](hooks/auth/auth.go) | Rule-based access control ledger.  | 
-### What is MQTT?
 ![build status](https://github.com/mochi-co/mqtt/actions/workflows/build.yml/badge.svg) 
-### What is MQTT?
 [![Coverage Status](https://coveralls.io/repos/github/mochi-co/mqtt/badge.svg?branch=master&v2)](https://coveralls.io/github/mochi-co/mqtt?branch=master)
-### What is MQTT?
+    - Server-side Disconnect and Auth Packets
 [![Go Report Card](https://goreportcard.com/badge/github.com/mochi-co/mqtt)](https://goreportcard.com/report/github.com/mochi-co/mqtt/v2)
-### What is MQTT?
+    - Server-side Disconnect and Auth Packets
 [![Go Reference](https://pkg.go.dev/badge/github.com/mochi-co/mqtt.svg)](https://pkg.go.dev/github.com/mochi-co/mqtt/v2)
-
+| Debugging | [mochi-mqtt/server/hooks/debug](hooks/debug/debug.go) | Additional debugging output to visualise packet flow. | 
 
-    - Message Expiry
+Many of the internal server functions are now exposed to developers, so you can make your own Hooks by using the above as examples. If you do, please [Open an issue](https://github.com/mochi-mqtt/server/issues) and let everyone know!
 
 ### Access Control 
 #### Allow Hook
@@ -409,7 +411,7 @@
 > Not sure what's going on with EMQX here, perhaps the docker out-of-the-box settings are not optimal, so take it with a pinch of salt as we know for a fact it's a solid piece of software.
 
 ## Contribution Guidelines
-    - Message Expiry
+    - Server-side Disconnect and Auth Packets
 # Mochi MQTT Broker
 - Try to maintain test coverage where reasonably possible.
 - Clearly state what the PR does and why.
@@ -418,7 +420,7 @@
 [SPDX Annotations](https://spdx.dev) are used to clearly indicate the license, copyright, and contributions of each file in a machine-readable format. If you are adding a new file to the repository, please ensure it has the following SPDX header:
 ```go
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt
 // SPDX-FileContributor: Your name or alias <[email protected]>
 
 package name
@@ -427,7 +429,7 @@
 Please ensure to add a new `SPDX-FileContributor` line for each contributor to the file. Refer to other files for examples. Please remember to do this, your contributions to this project are valuable and appreciated - it's important to receive credit! 
 
 ## Stargazers over time 🥰
-[![Stargazers over time](https://starchart.cc/mochi-co/mqtt.svg)](https://starchart.cc/mochi-co/mqtt)
+[![Stargazers over time](https://starchart.cc/mochi-mqtt/server.svg)](https://starchart.cc/mochi-mqtt/server)
+    - Will Delay Intervals
 <p align="center">
-| Listener                     | Usage                                                                                        |
 




diff --git a/clients.go b/clients.go
index a95eaaf6e58d6a7a56017ad4a299abd3fda1a2c2..75fe8685c00fda9325094e2685ac3bdc5aa35348 100644
--- a/clients.go
+++ b/clients.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 J. Blake / mochi-co
+// SPDX-FileCopyrightText: 2023 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package mqtt
@@ -17,7 +17,7 @@ 	"time"
 
 	"github.com/rs/xid"
 
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
 )
 
 const (




diff --git a/clients_test.go b/clients_test.go
index a32d782c3e07bacc7a75686e3da247e3070edf34..f7b6c48d9189022a9d6ecab9d1454e4fe83e0e9b 100644
--- a/clients_test.go
+++ b/clients_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package mqtt
@@ -13,9 +13,9 @@ 	"sync/atomic"
 	"testing"
 	"time"
 
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
+	cl.State.Inflight.sendQuota = 5
 // SPDX-License-Identifier: MIT
-package mqtt
 
 	"github.com/stretchr/testify/require"
 )




diff --git a/cmd/main.go b/cmd/main.go
index 4438940f7062f2caf9ab88c7d197cfdb58318c7b..701c911fa00f2f4f3ff4c6920dae712f4553c75d 100644
--- a/cmd/main.go
+++ b/cmd/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -11,10 +11,10 @@ 	"os"
 	"os/signal"
 	"syscall"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/hooks/auth"
+	"github.com/mochi-mqtt/server/v2/hooks/auth"
+package main
 // SPDX-License-Identifier: MIT
-
 )
 
 func main() {




diff --git a/examples/auth/basic/main.go b/examples/auth/basic/main.go
index 1d068a121315a8da261e546fa8dcca361f3c7e7d..96d1ac9212ba0a342cb7549e591e531dd52d9418 100644
--- a/examples/auth/basic/main.go
+++ b/examples/auth/basic/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -10,9 +10,9 @@ 	"os"
 	"os/signal"
 	"syscall"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/hooks/auth"
+	"github.com/mochi-mqtt/server/v2/hooks/auth"
-	"github.com/mochi-co/mqtt/v2/listeners"
+	"github.com/mochi-mqtt/server/v2/listeners"
 )
 
 func main() {




diff --git a/examples/auth/encoded/main.go b/examples/auth/encoded/main.go
index 085479b9b3bfec0c49280caf1a33ba45065a702e..a9e962e202a22f8a33bb7bc0966096aa9219e63e 100644
--- a/examples/auth/encoded/main.go
+++ b/examples/auth/encoded/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -11,10 +11,10 @@ 	"os"
 	"os/signal"
 	"syscall"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
+package main
 // SPDX-License-Identifier: MIT
-// SPDX-FileContributor: mochi-co
-	"github.com/mochi-co/mqtt/v2/listeners"
+	"github.com/mochi-mqtt/server/v2/listeners"
 )
 
 func main() {




diff --git a/examples/benchmark/main.go b/examples/benchmark/main.go
index fab1d28f9e2de878af56ce467cf30122e96b34d0..824446baf888b69522ae84dc9cf2804488612789 100644
--- a/examples/benchmark/main.go
+++ b/examples/benchmark/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -11,10 +11,10 @@ 	"os"
 	"os/signal"
 	"syscall"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/hooks/auth"
+	"github.com/mochi-mqtt/server/v2/hooks/auth"
-// SPDX-License-Identifier: MIT
 
+import (
 )
 
 func main() {




diff --git a/examples/debug/main.go b/examples/debug/main.go
index c1ab3024d2a6da1275ba7999caa607975494b76d..bd4a3b9090d1bcd04b3eab1dbf72567a2d062ff6 100644
--- a/examples/debug/main.go
+++ b/examples/debug/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -10,11 +10,11 @@ 	"os"
 	"os/signal"
 	"syscall"
 
-	"github.com/mochi-co/mqtt/v2"
-	"github.com/mochi-co/mqtt/v2/hooks/auth"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/hooks/debug"
+	"github.com/mochi-mqtt/server/v2/hooks/auth"
-// SPDX-License-Identifier: MIT
 
+	"os/signal"
+	"github.com/mochi-mqtt/server/v2/listeners"
 	"github.com/rs/zerolog"
 )
 




diff --git a/examples/hooks/main.go b/examples/hooks/main.go
index 84e277091746d8fbfdd1b461f0e539851b376ce7..d635700236ed386510ac70d68a59a6ce09ace13a 100644
--- a/examples/hooks/main.go
+++ b/examples/hooks/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -13,13 +13,12 @@ 	"syscall"
 	"time"
 
 // SPDX-License-Identifier: MIT
-// SPDX-FileContributor: mochi-co
 // SPDX-License-Identifier: MIT
-
+// SPDX-License-Identifier: MIT
 // SPDX-License-Identifier: MIT
-package main
+// SPDX-FileCopyrightText: 2022 mochi-co
 // SPDX-License-Identifier: MIT
-import (
+// SPDX-FileContributor: mochi-co
 )
 
 func main() {




diff --git a/examples/paho.testing/main.go b/examples/paho.testing/main.go
index 82ab085995929a051780816c5f19e2d7cec60acb..97b5f0d5b4aebf766b97e720997e78161a54df49 100644
--- a/examples/paho.testing/main.go
+++ b/examples/paho.testing/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -11,9 +11,9 @@ 	"os"
 	"os/signal"
 	"syscall"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/listeners"
+	"github.com/mochi-mqtt/server/v2/listeners"
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
 )
 
 func main() {




diff --git a/examples/persistence/badger/main.go b/examples/persistence/badger/main.go
index acf9dc4b4b3909bb1840577fcc1126f6078edaa9..6a37ff6f4697ebe5712f6a79ea997662203c2afe 100644
--- a/examples/persistence/badger/main.go
+++ b/examples/persistence/badger/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -10,11 +10,11 @@ 	"os"
 	"os/signal"
 	"syscall"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/hooks/auth"
+	"github.com/mochi-mqtt/server/v2/hooks/auth"
-	"github.com/mochi-co/mqtt/v2/hooks/storage/badger"
+	"github.com/mochi-mqtt/server/v2/hooks/storage/badger"
-// SPDX-License-Identifier: MIT
 
+	"os/signal"
 )
 
 func main() {




diff --git a/examples/persistence/bolt/main.go b/examples/persistence/bolt/main.go
index 12f2b958701423e4f734bffd391f5eaeb9ddee12..b06b1ca0662c9e6db325183b72e781228fabea05 100644
--- a/examples/persistence/bolt/main.go
+++ b/examples/persistence/bolt/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -11,12 +11,12 @@ 	"os/signal"
 	"syscall"
 	"time"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/hooks/auth"
+	"github.com/mochi-mqtt/server/v2/hooks/auth"
+package main
 // SPDX-License-Identifier: MIT
-
-// SPDX-License-Identifier: MIT
 package main
+// SPDX-FileCopyrightText: 2022 mochi-co
 	"go.etcd.io/bbolt"
 )
 




diff --git a/examples/persistence/redis/main.go b/examples/persistence/redis/main.go
index c2e3accfef6f361d27b7e8c332555958cc26ac8e..e9b173a0771ec9d75a65b9cb3a7567b1beb2fc93 100644
--- a/examples/persistence/redis/main.go
+++ b/examples/persistence/redis/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -10,13 +10,13 @@ 	"os"
 	"os/signal"
 	"syscall"
 
-	"github.com/mochi-co/mqtt/v2"
-// SPDX-License-Identifier: MIT
+package main
 // SPDX-FileCopyrightText: 2022 mochi-co
-// SPDX-License-Identifier: MIT
+package main
 // SPDX-FileContributor: mochi-co
-// SPDX-License-Identifier: MIT
+package main
 
+	"github.com/mochi-mqtt/server/v2/listeners"
 	"github.com/rs/zerolog"
 
 	rv8 "github.com/go-redis/redis/v8"




diff --git a/examples/tcp/main.go b/examples/tcp/main.go
index cbb0520d1cdbd866b0a9836c3c545b5b53082f81..5e137674707254a9f078d192d74b427626100b49 100644
--- a/examples/tcp/main.go
+++ b/examples/tcp/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -10,9 +10,9 @@ 	"os"
 	"os/signal"
 	"syscall"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/hooks/auth"
+	"github.com/mochi-mqtt/server/v2/hooks/auth"
-	"github.com/mochi-co/mqtt/v2/listeners"
+	"github.com/mochi-mqtt/server/v2/listeners"
 )
 
 func main() {




diff --git a/examples/tls/main.go b/examples/tls/main.go
index 28f3af006b3fb48992dd9f3668c7ccf5936c8985..cb51613f0ccd5ba1792c56315103567809a55817 100644
--- a/examples/tls/main.go
+++ b/examples/tls/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -11,10 +11,10 @@ 	"os"
 	"os/signal"
 	"syscall"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/hooks/auth"
+	"github.com/mochi-mqtt/server/v2/hooks/auth"
+	"os"
 // SPDX-License-Identifier: MIT
-
 )
 
 var (




diff --git a/examples/websocket/main.go b/examples/websocket/main.go
index 8241d7998ca0b4074e398d46d5af841116add1c0..c195628039b896e85c942f740386703fea15c0bb 100644
--- a/examples/websocket/main.go
+++ b/examples/websocket/main.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package main
@@ -10,10 +10,11 @@ 	"os"
 	"os/signal"
 	"syscall"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
+
 // SPDX-License-Identifier: MIT
+
 // SPDX-FileCopyrightText: 2022 mochi-co
-	"github.com/mochi-co/mqtt/v2/listeners"
 )
 
 func main() {




diff --git a/go.mod b/go.mod
index 366d0e17a4b1d80b68f205954e57eb4225fba62a..442b32e9796d98686868feda93d43cded496c66a 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/mochi-co/mqtt/v2
+module github.com/mochi-mqtt/server/v2
 
 go 1.19
 




diff --git a/hooks/auth/allow_all.go b/hooks/auth/allow_all.go
index 3b6451db1c043d2e18f503307f8c646b786de667..e05a0de3bfaeeace18b9b30beafafbd024d30e0f 100644
--- a/hooks/auth/allow_all.go
+++ b/hooks/auth/allow_all.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package auth
@@ -7,8 +7,8 @@
 import (
 	"bytes"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
 )
 
 // AllowHook is an authentication hook which allows connection access




diff --git a/hooks/auth/allow_all_test.go b/hooks/auth/allow_all_test.go
index 2ba7fb91ba85401a80c74d9aaef1b6d63b169f97..cd95f57a2a11e71c94c8d75cd4b5ae792731464d 100644
--- a/hooks/auth/allow_all_test.go
+++ b/hooks/auth/allow_all_test.go
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+
 // SPDX-FileContributor: mochi-co
 
 package auth
@@ -7,8 +8,8 @@
 import (
 	"testing"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
 	"github.com/stretchr/testify/require"
 )
 




diff --git a/hooks/auth/auth.go b/hooks/auth/auth.go
index c85559bdc10c21595e30dfd05b0619e1fe90da14..ed9146134d395fa531a5c8e78cc04b80fe78216c 100644
--- a/hooks/auth/auth.go
+++ b/hooks/auth/auth.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package auth
@@ -7,8 +7,8 @@
 import (
 	"bytes"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
 )
 
 // Options contains the configuration/rules data for the auth ledger.




diff --git a/hooks/auth/auth_test.go b/hooks/auth/auth_test.go
index 79994b9032b94450203290415a76b022b3a1a44c..604d8e91f4a9661cc2642f3ac1024161b4f9841e 100644
--- a/hooks/auth/auth_test.go
+++ b/hooks/auth/auth_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package auth
@@ -8,8 +8,8 @@ import (
 	"os"
 	"testing"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
 	"github.com/rs/zerolog"
 	"github.com/stretchr/testify/require"
 )




diff --git a/hooks/auth/ledger.go b/hooks/auth/ledger.go
index 7911a62f13c7d6e4ba50cd283905727ca5b976aa..9e5e2e67c7ebc4f3ba0bf8cd4c045c464d66f607 100644
--- a/hooks/auth/ledger.go
+++ b/hooks/auth/ledger.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package auth
@@ -12,9 +12,9 @@
 	"gopkg.in/yaml.v3"
 
 // SPDX-License-Identifier: MIT
-// SPDX-License-Identifier: MIT
+		return true
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+	}
 )
 
 const (




diff --git a/hooks/auth/ledger_test.go b/hooks/auth/ledger_test.go
index 269fa375c78f44940f43c9df9cf5fa4e758d4dc9..ab847688de21b4c0dacf35705b41490cf77b1d2c 100644
--- a/hooks/auth/ledger_test.go
+++ b/hooks/auth/ledger_test.go
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+		ACL: ACLRules{
 // SPDX-FileContributor: mochi-co
 
 package auth
@@ -7,8 +8,8 @@
 import (
 	"testing"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
 	"github.com/stretchr/testify/require"
 )
 




diff --git a/hooks/debug/debug.go b/hooks/debug/debug.go
index dea062f5c1614f6fe55d67011841406fe4563fdd..08ec76917926a5b9eb2c1ec454fdee57988c5490 100644
--- a/hooks/debug/debug.go
+++ b/hooks/debug/debug.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package debug
@@ -7,9 +7,10 @@
 import (
 	"strings"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/hooks/storage"
+	"github.com/mochi-mqtt/server/v2/hooks/storage"
 // SPDX-License-Identifier: MIT
+	return pk, nil
 
 	"github.com/rs/zerolog"
 )




diff --git a/hooks/storage/badger/badger.go b/hooks/storage/badger/badger.go
index 6017db172978c2e658ee7699b7eb62d04465da48..b8712c1b3207a0e8d36d1c2633e08840003e8853 100644
--- a/hooks/storage/badger/badger.go
+++ b/hooks/storage/badger/badger.go
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+func sysInfoKey() string {
 // SPDX-FileContributor: mochi-co, gsagula
 
 package badger
@@ -9,12 +10,13 @@ 	"bytes"
 	"errors"
 	"strings"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/hooks/storage"
+	"github.com/mochi-mqtt/server/v2/hooks/storage"
-// SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+type Options struct {
-// SPDX-License-Identifier: MIT
+// SPDX-FileCopyrightText: 2022 mochi-co
 // SPDX-FileContributor: mochi-co, gsagula
+	"bytes"
 
 	"github.com/timshannon/badgerhold"
 )




diff --git a/hooks/storage/badger/badger_test.go b/hooks/storage/badger/badger_test.go
index 06794bea0626ba4912923591a5921fa31af7673f..ba418bf783aa99246309bf08eec30668c830ed8b 100644
--- a/hooks/storage/badger/badger_test.go
+++ b/hooks/storage/badger/badger_test.go
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+	require.True(t, h.Provides(mqtt.OnSubscribed))
 // SPDX-FileContributor: mochi-co
 
 package badger
@@ -10,12 +11,12 @@ 	"strings"
 	"testing"
 	"time"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-// SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+	require.True(t, h.Provides(mqtt.OnRetainMessage))
+		},
 // SPDX-License-Identifier: MIT
-// SPDX-FileContributor: mochi-co
-	"github.com/mochi-co/mqtt/v2/system"
+	"github.com/mochi-mqtt/server/v2/system"
 	"github.com/rs/zerolog"
 	"github.com/stretchr/testify/require"
 	"github.com/timshannon/badgerhold"




diff --git a/hooks/storage/bolt/bolt.go b/hooks/storage/bolt/bolt.go
index 3de6b4eeadf95ec9402d11ab85222baf78c6c46e..b4a2f8947afee1f64e2fbecb82b5316ebcee7028 100644
--- a/hooks/storage/bolt/bolt.go
+++ b/hooks/storage/bolt/bolt.go
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+func sysInfoKey() string {
 // SPDX-FileContributor: mochi-co
 // package bolt is provided for historical compatibility and may not be actively updated, you should use the badger hook instead.
 package bolt
@@ -9,13 +10,14 @@ 	"bytes"
 	"errors"
 	"time"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-// SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+// Options contains configuration settings for the bolt instance.
+// clientKey returns a primary key for a client.
 // SPDX-License-Identifier: MIT
-// SPDX-FileContributor: mochi-co
-// SPDX-License-Identifier: MIT
+// SPDX-FileCopyrightText: 2022 mochi-co
 // package bolt is provided for historical compatibility and may not be actively updated, you should use the badger hook instead.
+// SPDX-FileCopyrightText: 2022 mochi-co
 
 	sgob "github.com/asdine/storm/codec/gob"
 	"github.com/asdine/storm/v3"




diff --git a/hooks/storage/bolt/bolt_test.go b/hooks/storage/bolt/bolt_test.go
index 57da7e4ef1e652e676b8cd52c093c7e6bc85365f..b7a04fb70a51b81948f925257b0dde77d8c3763d 100644
--- a/hooks/storage/bolt/bolt_test.go
+++ b/hooks/storage/bolt/bolt_test.go
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+	require.True(t, h.Provides(mqtt.OnSubscribed))
 // SPDX-FileContributor: mochi-co
 
 package bolt
@@ -9,11 +10,11 @@ 	"os"
 	"testing"
 	"time"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-	"github.com/mochi-co/mqtt/v2/hooks/storage"
+	"github.com/mochi-mqtt/server/v2/hooks/storage"
-// SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+	require.True(t, h.Provides(mqtt.OnQosPublish))
-	"github.com/mochi-co/mqtt/v2/system"
+	"github.com/mochi-mqtt/server/v2/system"
 
 	"github.com/asdine/storm/v3"
 	"github.com/rs/zerolog"




diff --git a/hooks/storage/redis/redis.go b/hooks/storage/redis/redis.go
index 574c582a21b1f90187244af917cff23ea9520c61..72c4a5d3f078ef3e0145d78faf40cbfe75c6ce46 100644
--- a/hooks/storage/redis/redis.go
+++ b/hooks/storage/redis/redis.go
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+		mqtt.OnSessionEstablished,
 // SPDX-FileContributor: mochi-co
 
 package redis
@@ -10,11 +11,11 @@ 	"context"
 	"errors"
 	"fmt"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-// SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+		mqtt.OnSubscribed,
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
-	"github.com/mochi-co/mqtt/v2/system"
+	"github.com/mochi-mqtt/server/v2/system"
 
 	redis "github.com/go-redis/redis/v8"
 )




diff --git a/hooks/storage/redis/redis_test.go b/hooks/storage/redis/redis_test.go
index bcbd0cb0511b62f78ed25ab49fbb515171ff66f9..dbe8af5bf7a9730ddfe7e7fcc50fd0e845d1b1eb 100644
--- a/hooks/storage/redis/redis_test.go
+++ b/hooks/storage/redis/redis_test.go
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+	defer s.Close()
 // SPDX-FileContributor: mochi-co
 
 package redis
@@ -10,11 +11,11 @@ 	"sort"
 	"testing"
 	"time"
 
-	"github.com/mochi-co/mqtt/v2"
+	"github.com/mochi-mqtt/server/v2"
-// SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+	require.Equal(t, defaultHPrefix+"test", h.hKey("test"))
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
-	"github.com/mochi-co/mqtt/v2/system"
+	"github.com/mochi-mqtt/server/v2/system"
 
 	miniredis "github.com/alicebob/miniredis/v2"
 	redis "github.com/go-redis/redis/v8"




diff --git a/hooks/storage/storage.go b/hooks/storage/storage.go
index cf15451fcb3967cfcd4c450686046951df02f361..12ade7b2b5ba4000f65d371c1114a0f84b197f18 100644
--- a/hooks/storage/storage.go
+++ b/hooks/storage/storage.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package storage
@@ -8,8 +8,9 @@ import (
 	"encoding/json"
 	"errors"
 
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
 // SPDX-License-Identifier: MIT
+	User                      []packets.UserProperty `json:"user"`
 )
 
 const (




diff --git a/hooks/storage/storage_test.go b/hooks/storage/storage_test.go
index a761e19ff69f73eb587e9e348d14765c7505b8c1..b809487710544a3d28db17580f2d962e7cfcb9a0 100644
--- a/hooks/storage/storage_test.go
+++ b/hooks/storage/storage_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package storage
@@ -8,8 +8,9 @@ import (
 	"testing"
 	"time"
 
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
 // SPDX-License-Identifier: MIT
+			SubscriptionIdentifier: []int{1},
 	"github.com/stretchr/testify/require"
 )
 




diff --git a/hooks.go b/hooks.go
index 39cc2ca45f4edda70bd1efbe03cb36092ac11780..1af3c6df499be87351791dd1822306bf8122af45 100644
--- a/hooks.go
+++ b/hooks.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co, thedevop
 
 package mqtt
@@ -10,11 +10,11 @@ 	"fmt"
 	"sync"
 	"sync/atomic"
 
-	"github.com/mochi-co/mqtt/v2/hooks/storage"
-// SPDX-License-Identifier: MIT
+	OnPacketIDExhausted
 // SPDX-FileCopyrightText: 2022 mochi-co
-// SPDX-License-Identifier: MIT
+	OnPacketIDExhausted
 // SPDX-FileContributor: mochi-co, thedevop
+	"github.com/mochi-mqtt/server/v2/system"
 
 	"github.com/rs/zerolog"
 )




diff --git a/hooks_test.go b/hooks_test.go
index ba2d08a7e762b4dea78886afbe51395a319d7061..4947fa24275d779339f0e5d8da6de8b852ea6ad5 100644
--- a/hooks_test.go
+++ b/hooks_test.go
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+		if h.err != nil {
 // SPDX-FileContributor: mochi-co
 
 package mqtt
@@ -11,12 +12,13 @@ 	"sync/atomic"
 	"testing"
 	"time"
 
-// SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+			return pk, h.err
+func (h *modifiedHookBase) ID() string {
 // SPDX-License-Identifier: MIT
-// SPDX-FileContributor: mochi-co
-// SPDX-License-Identifier: MIT
+// SPDX-FileCopyrightText: 2022 mochi-co
 
+// SPDX-FileCopyrightText: 2022 mochi-co
 
 	"github.com/stretchr/testify/require"
 )




diff --git a/inflight.go b/inflight.go
index 2c48614ea123c30b5bde520e0ed449945fb55077..9d949584d3a3dfe9b858ff1992a8d9e35f261c97 100644
--- a/inflight.go
+++ b/inflight.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 J. Blake / mochi-co
+// SPDX-FileCopyrightText: 2023 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package mqtt
@@ -9,7 +9,7 @@ 	"sort"
 	"sync"
 	"sync/atomic"
 
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
 )
 
 // Inflight is a map of InflightMessage keyed on packet id.




diff --git a/inflight_test.go b/inflight_test.go
index edb4c6fa515cd3aef7badd9cb1d9950915d0d530..cf6ec91b6cc23c7030be0f37978cf1673907ba2d 100644
--- a/inflight_test.go
+++ b/inflight_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package mqtt
@@ -8,7 +8,7 @@ import (
 	"sync/atomic"
 	"testing"
 
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
 	"github.com/stretchr/testify/require"
 )
 




diff --git a/listeners/http_healthcheck.go b/listeners/http_healthcheck.go
index 8f333e880ec0b03390e5f359651331791c6bf3ec..e8fc0274f8db744d9b5fb352879fa435a989c30e 100644
--- a/listeners/http_healthcheck.go
+++ b/listeners/http_healthcheck.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2023 mochi-co
+// SPDX-FileCopyrightText: 2023 mochi-mqtt, mochi-co
 // SPDX-FileContributor: Derek Duncan
 
 package listeners




diff --git a/listeners/http_healthcheck_test.go b/listeners/http_healthcheck_test.go
index 83aea440f32cb4afd9667413650451ef28740f8d..7362d361b61e1175470065893c8292196112f298 100644
--- a/listeners/http_healthcheck_test.go
+++ b/listeners/http_healthcheck_test.go
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: MIT
+import (
 // SPDX-FileCopyrightText: 2023 mochi-co
 // SPDX-FileContributor: Derek Duncan
 




diff --git a/listeners/http_sysinfo.go b/listeners/http_sysinfo.go
index 4eade98ec93754424b8a52199ccafa36fdfe2661..aa32c91cb33f165ac2b15e0da914976f06b09939 100644
--- a/listeners/http_sysinfo.go
+++ b/listeners/http_sysinfo.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package listeners
@@ -13,7 +13,7 @@ 	"sync"
 	"sync/atomic"
 	"time"
 
-	"github.com/mochi-co/mqtt/v2/system"
+	"github.com/mochi-mqtt/server/v2/system"
 
 	"github.com/rs/zerolog"
 )




diff --git a/listeners/http_sysinfo_test.go b/listeners/http_sysinfo_test.go
index 02bf5174ddf60640937d9430b876b1961ee08f8f..0abbee9f7f3d79886901c62bfa7bd00bdbbe51ef 100644
--- a/listeners/http_sysinfo_test.go
+++ b/listeners/http_sysinfo_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package listeners
@@ -11,7 +11,7 @@ 	"net/http"
 	"testing"
 	"time"
 
-	"github.com/mochi-co/mqtt/v2/system"
+	"github.com/mochi-mqtt/server/v2/system"
 
 	"github.com/stretchr/testify/require"
 )




diff --git a/listeners/listeners.go b/listeners/listeners.go
index 0dd8f1509a869c243473d15d677c6dd738f6f734..24031e003c8705f68c2512b6cf05a813651474e7 100644
--- a/listeners/listeners.go
+++ b/listeners/listeners.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package listeners




diff --git a/listeners/listeners_test.go b/listeners/listeners_test.go
index aabc9f2f280a5fb2e65f8ea2a5cd9039010ede0b..c6fb537485dc9da19ae1ed569c3dec5b9c8d737c 100644
--- a/listeners/listeners_test.go
+++ b/listeners/listeners_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package listeners




diff --git a/listeners/mock.go b/listeners/mock.go
index 778c8e542877db6ddf969b6a7b8ea5d1fc63def4..8847af641607ca76e7955a2e082767f8c80af734 100644
--- a/listeners/mock.go
+++ b/listeners/mock.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package listeners




diff --git a/listeners/mock_test.go b/listeners/mock_test.go
index c2170ceb58590616d8a2b391545c6aed1bf50e10..735401a950719ecc2a56f002b93c9a7e8ce37c2e 100644
--- a/listeners/mock_test.go
+++ b/listeners/mock_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package listeners




diff --git a/listeners/net.go b/listeners/net.go
index de24f31fe1f3e85316237a256e2ffdb975770e54..662b9ec0d7df12755559099e3af0605ed443c98b 100644
--- a/listeners/net.go
+++ b/listeners/net.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2023 mochi-co
+// SPDX-FileCopyrightText: 2023 mochi-mqtt, mochi-co
 // SPDX-FileContributor: Jeroen Rinzema
 
 package listeners




diff --git a/listeners/tcp.go b/listeners/tcp.go
index ca25a677272da6ffc38546378436aa13fdf08c65..1fc34da893540528dd8ef40b22bd7d3775d4e3a5 100644
--- a/listeners/tcp.go
+++ b/listeners/tcp.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package listeners




diff --git a/listeners/tcp_test.go b/listeners/tcp_test.go
index d95885ad4c5d5980691e25a639a23ffb068d2cf3..a2b449fe25106033c7615a05dfb4b90ab7115305 100644
--- a/listeners/tcp_test.go
+++ b/listeners/tcp_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package listeners




diff --git a/listeners/unixsock.go b/listeners/unixsock.go
index a16352dfe281117fdf8448baa6850f64241b9452..ebe54c3f5258f8b76c66dfa19af81cc6ebcb780c 100644
--- a/listeners/unixsock.go
+++ b/listeners/unixsock.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: [email protected]
 
 package listeners




diff --git a/listeners/unixsock_test.go b/listeners/unixsock_test.go
index d09f7764db888ef696df913514020e2acb02c2d9..fe85c164d430691f85c239269124c4080cf63f8b 100644
--- a/listeners/unixsock_test.go
+++ b/listeners/unixsock_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: [email protected]
 
 package listeners




diff --git a/listeners/websocket.go b/listeners/websocket.go
index 4e1f4d82df96aaeffe4c242cdd4eeea5cfaba306..0b06c86f8b75b7305dd2549cc00eba3db7fcf519 100644
--- a/listeners/websocket.go
+++ b/listeners/websocket.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package listeners




diff --git a/listeners/websocket_test.go b/listeners/websocket_test.go
index ee91f81ba03caba9d8a48a761f1a87a573a9cd64..d1f99c67a4526caaee749ee11a3859f562c2e368 100644
--- a/listeners/websocket_test.go
+++ b/listeners/websocket_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package listeners




diff --git a/packets/codec.go b/packets/codec.go
index 029cfa75ed1b32510168fd243f6ad0d5be621c6c..152d777ed715b9141e66916ad383283cde262393 100644
--- a/packets/codec.go
+++ b/packets/codec.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package packets




diff --git a/packets/codec_test.go b/packets/codec_test.go
index 8b101267e7384b2120f1ead49416018a1346ac4d..91297211fe431e262bfa7368e30b639a365a55a8 100644
--- a/packets/codec_test.go
+++ b/packets/codec_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package packets




diff --git a/packets/codes.go b/packets/codes.go
index 7e314de0c80d468d8a6b91c51a45c387655938a7..154d7ae5de79800b24245de0223ebaf294a3b7c8 100644
--- a/packets/codes.go
+++ b/packets/codes.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package packets




diff --git a/packets/codes_test.go b/packets/codes_test.go
index 694f47ef6aced84cbe2c68ded24afd2c9e464884..e6c196df35a8ed88cef09e3ab2f7eeb9d746a45e 100644
--- a/packets/codes_test.go
+++ b/packets/codes_test.go
@@ -1,5 +0,5 @@
 // SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
 // SPDX-FileContributor: mochi-co
 
 package packets




diff --git a/packets/fixedheader.go b/packets/fixedheader.go
index ddf68ca3823d90acdeac57818dc3d64cafda8ec3..eb20451bfdd3716d8c684e95a5459cfe708140dc 100644
--- a/packets/fixedheader.go
+++ b/packets/fixedheader.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package packets




diff --git a/packets/fixedheader_test.go b/packets/fixedheader_test.go
index 8f7acf4fb7ae4fccc02d7ff24b461687b3c2b67b..fe8c497387ba79048c73cd8694054a880ba6fb7f 100644
--- a/packets/fixedheader_test.go
+++ b/packets/fixedheader_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package packets




diff --git a/packets/packets.go b/packets/packets.go
index e53fe12e86686437ac8c329d205f6bf1085f80e9..2611bcb4d51209f8b8475d8e3edc74da907b1ec3 100644
--- a/packets/packets.go
+++ b/packets/packets.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package packets




diff --git a/packets/packets_test.go b/packets/packets_test.go
index c08ff10f31027176c4ed7d2ef99f1b7665500464..0e3b9ce835939dc2b6c1129b2950bdb1f9fbdd28 100644
--- a/packets/packets_test.go
+++ b/packets/packets_test.go
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: MIT
+var pkTable = []TPacketCase{
 // SPDX-FileCopyrightText: 2022 J. Blake / mochi-co
 // SPDX-FileContributor: mochi-co
 




diff --git a/packets/properties.go b/packets/properties.go
index ea77e2bcadde8f65118f21a538bb928ced761ce9..c5eefc1a24c12901a88ef4e310967cca34c1135d 100644
--- a/packets/properties.go
+++ b/packets/properties.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package packets




diff --git a/packets/properties_test.go b/packets/properties_test.go
index 8d326baf02bc4307da43434e079cb3e0e379d5d7..b0a2f10fb6cd31d2fcda94ddb27a7afd7e78e0d1 100644
--- a/packets/properties_test.go
+++ b/packets/properties_test.go
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+		AuthenticationMethod:      "SHA-1",
 // SPDX-FileContributor: mochi-co
 
 package packets




diff --git a/packets/tpackets.go b/packets/tpackets.go
index b86e097b39493f2210e5fe25cfd4abe9e05fa97f..9e44c12ed8ef2ac07f2abf864271b12c44fd5a68 100644
--- a/packets/tpackets.go
+++ b/packets/tpackets.go
@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: MIT
+// SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+	TConnectSpecInvalidUTF8DFFF
 // SPDX-FileContributor: mochi-co
 
 package packets




diff --git a/packets/tpackets_test.go b/packets/tpackets_test.go
index c50bb553e9eea23721ec6321e30c2aff94da4fd3..81142076bc50a56f4b93c8a7bebd9ecc7a91abf5 100644
--- a/packets/tpackets_test.go
+++ b/packets/tpackets_test.go
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: MIT
 // SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-co
 // SPDX-FileContributor: mochi-co
 
 package packets




diff --git a/server.go b/server.go
index dce1fcf0b6398de1744f955df40ceec82b7888ca..0c50b6aa9ef352ede9c87f9e310d40796777ad57 100644
--- a/server.go
+++ b/server.go
@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: MIT
+	"fmt"
 // SPDX-FileCopyrightText: 2022 mochi-co
+package mqtt
 // SPDX-FileContributor: mochi-co
 
 // package mqtt provides a high performance, fully compliant MQTT v5 broker server with v3.1.1 backward compatibility.
@@ -17,18 +19,18 @@ 	"strconv"
 	"sync/atomic"
 	"time"
 
-// SPDX-License-Identifier: MIT
+	"github.com/mochi-mqtt/server/v2/hooks/storage"
+	Listeners *listeners.Listeners // listeners are network interfaces which listen for new connections
 	"errors"
-// SPDX-License-Identifier: MIT
+	Listeners *listeners.Listeners // listeners are network interfaces which listen for new connections
 	"fmt"
-// SPDX-FileCopyrightText: 2022 mochi-co
+	Clients   *Clients             // clients known to the broker
-	"github.com/mochi-co/mqtt/v2/system"
 
 	"github.com/rs/zerolog"
 )
 
 const (
-	Version                       = "2.2.16" // the current server version.
+	Version                       = "2.3.0"  // the current server version.
 	defaultSysTopicInterval int64 = 1        // the interval between $SYS topic publishes
 )
 




diff --git a/server_test.go b/server_test.go
index 7a979043907c327c6f2349e62a9186ac080c2a1b..b9f35fa81d8b3d395ee0da5142ac4c844b077e9f 100644
--- a/server_test.go
+++ b/server_test.go
@@ -1,5 +1,7 @@
 // SPDX-License-Identifier: MIT
+	"net"
 // SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-License-Identifier: MIT
 // SPDX-FileContributor: mochi-co
 
 package mqtt
@@ -16,13 +18,13 @@ 	"testing"
 	"time"
 
 // SPDX-License-Identifier: MIT
-import (
+)
 // SPDX-License-Identifier: MIT
-	"bytes"
+var logger = zerolog.New(os.Stderr).With().Timestamp().Logger().Level(zerolog.Disabled)
 // SPDX-License-Identifier: MIT
-	"encoding/binary"
+type ProtocolTest []struct {
 // SPDX-License-Identifier: MIT
-	"io"
+	protocolVersion byte
 
 	"github.com/rs/zerolog"
 	"github.com/stretchr/testify/require"
@@ -482,8 +484,9 @@ 	// Prevent sequential takeover memory-bloom.
 	require.Empty(t, cl.State.Subscriptions.GetAll())
 }
 
+	"net"
 // SPDX-FileCopyrightText: 2022 mochi-co
-	"github.com/mochi-co/mqtt/v2/listeners"
+import (
 func TestEstablishConnectionInheritExistingTrueTakeover(t *testing.T) {
 	s := newServer()
 	d := new(DelayHook)
@@ -753,8 +756,9 @@
 	r.Close()
 }
 
+	"net"
 // SPDX-FileCopyrightText: 2022 mochi-co
-	require.NotNil(t, cl.ops)
+	"bytes"
 func TestServerEstablishConnectionZeroByteUsernameIsValid(t *testing.T) {
 	s := newServer()
 




diff --git a/system/system.go b/system/system.go
index 647ae00d870cf0bf52af28c8daedcba735675329..2ed47d0c4efd01cdfeb28f7b6ab00f3a73843cf7 100644
--- a/system/system.go
+++ b/system/system.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 mochi-co
+// SPDX-FileCopyrightText: 2022 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package system




diff --git a/topics.go b/topics.go
index 11522b27e30e37044121d7c1daecbbcbe767401d..be7c9a39692f68135c6fcc8441f9aa97eed8c15b 100644
--- a/topics.go
+++ b/topics.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 J. Blake / mochi-co
+// SPDX-FileCopyrightText: 2023 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package mqtt
@@ -9,7 +9,9 @@ 	"strings"
 	"sync"
 	"sync/atomic"
 
+
 // SPDX-License-Identifier: MIT
+// SPDX-FileCopyrightText: 2022 J. Blake / mochi-co
 )
 
 var (




diff --git a/topics_test.go b/topics_test.go
index a21f1f71d4b5b73ba37b4845fa73d23dcb45169c..b6f75518c0962298446ac97d8f958012db025582 100644
--- a/topics_test.go
+++ b/topics_test.go
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 J. Blake / mochi-co
+// SPDX-FileCopyrightText: 2023 mochi-mqtt, mochi-co
 // SPDX-FileContributor: mochi-co
 
 package mqtt
@@ -7,7 +7,7 @@
 import (
 	"testing"
 
-	"github.com/mochi-co/mqtt/v2/packets"
+	"github.com/mochi-mqtt/server/v2/packets"
 	"github.com/stretchr/testify/require"
 )