Code Monkey home page Code Monkey logo

Comments (5)

shamblett avatar shamblett commented on August 30, 2024 1

You are getting the server client and the browser client confused somehow, if you are using secure sockets on the server side then you need to use the security context, if you are using the browser client(not for flutter BTW, use the server client) you don't, you can only use ws or wss url's nothing else so you don't need the security context.

Its difficult se what it is your trying to do however one line from your log above shows -

1-2023-05-05 10:10:45.634 -- MqttBrowserWsConnection::connect - websocket has erred

Which means either your broker is not accepting connections from clients or there is no route to it over the network.

You may be better fixing one problem at time rather than swapping between server side and browser initially.

from mqtt_client.

maliswe avatar maliswe commented on August 30, 2024

Yeah, that is happening actually, I am using it for the flutter project, so you mean that I need to use server client.
What if I want use like local host, I mean I want to have connection between the the windows terminal and the app in the emulator, I tried to do it, but had problem with the it, do you have any ideas, how can I fix it?

from mqtt_client.

shamblett avatar shamblett commented on August 30, 2024

As far as Dart is concerned flutter is a server side framework, like the VM so you must use the server client, the security context property will then be available, note you only need to use this if you are using secure sockets with TLS, not if you are using normal TCP sockets or websockets using ws or wss.

I don't develop on Windows nor do I use an emulator(presumably you are using android studio which I don't use) so I can't help here, maybe post on a more general flutter board. The client just needs an MQTT broker to connect to.

from mqtt_client.

maliswe avatar maliswe commented on August 30, 2024

DONE!! Working well

from mqtt_client.

jeffreycool avatar jeffreycool commented on August 30, 2024

I have the same problem, can you tell me how you solved it?

from mqtt_client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.