0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

MacにEclipse MosquittoをインストールしてPub/Subを試す

Posted at

MacにEclipse MosquittoをインストールしてPub/Subを試す。

インストール/アンインストール

Homebrewで以下のように簡単にインストール/アンインストール出来る。

brew install mosquitto
brew uninstall mosquitto

サーバの開始/停止

サーバの開始と停止も簡単。

brew services start mosquitto
brew services stop mosquitto

websocket対応

websocketを使う場合は、

code /usr/local/etc/mosquitto/mosquitto.conf

の最後に

listener 1883
listener 9001
protocol websockets
allow_anonymous true

のように追加しサービスを再起動すると、

brew services restart mosquitto

以下のように呼び出すことが出来る。

"ws://localhost:9001"

のように呼び出せる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?