Comments (3)
No worries @andig. Note that you can create your own Listeners of any kind using the Listener
interface above. Some examples are provided:
A mock listener:
https://github.com/mochi-co/mqtt/blob/master/server/listeners/mock.go
TCP listener:
https://github.com/mochi-co/mqtt/blob/master/server/listeners/tcp.go
Websocket listener:
https://github.com/mochi-co/mqtt/blob/master/server/listeners/websocket.go
from server.
Hi @andig - If you are just using it for testing, you could create a mock listener using the Listener
interface https://github.com/mochi-co/mqtt/blob/master/server/listeners/listeners.go#L31
Otherwise you will need to specify a port when creating the TCP listener, for example:
tcp := listeners.NewTCP("t1", ":1883")
from server.
Thank you for the quick response. I must admit that I've given up and moved to a library that allows to provide your own listener. Imho that would be a preferable pattern if possible. Please feel free to close.
from server.
Related Issues (20)
- How to send topics posted by specific users only to specific subscribed users? HOT 11
- Does peddle perssistant released? HOT 5
- MQTTX cannot use Topic Alias. MQTT5.0 主题别名发送卡住,无法发布主题别名的消息 HOT 2
- How to use the new pessistent hook? HOT 1
- Reload auth fIle on the run HOT 2
- InlineClient模式下服务端订阅问题,inline subscribers do not receive messages HOT 5
- Merge 2 version of storm HOT 4
- Add Support for Disconnect With Will Message Reason Code
- Logging Level is not Configurable Via File Configuration
- Persistence storage did not work with SetCleanSession(false) HOT 3
- Don't allow inheriting session unless username matches HOT 5
- MessageExpiry Hook HOT 1
- OnConnectAuthenticate cannot specify an error code (like Client Identifier not valid)
- Resend timeout inflight messages
- Bug in inflight message restore from datastore
- Proposal: Add an Example for Custom Hook Usage HOT 2
- can I use mqtts ? HOT 2
- OCSP Stapling support ? HOT 1
- Metrics HOT 4
- MQTT bridge HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server.