GithubHelp home page GithubHelp logo

michalfoksa / rsmb Goto Github PK

View Code? Open in Web Editor NEW
38.0 38.0 24.0 310 KB

MQTT and MQTT-SN broker. Forked from http://git.eclipse.org/c/mosquitto/org.eclipse.mosquitto.rsmb.git

HTML 6.68% Makefile 1.35% C 86.32% C++ 1.33% Python 3.62% Groff 0.52% Perl 0.19%

rsmb's People

Contributors

michalfoksa avatar ralight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rsmb's Issues

Socket error "Transportation endpoint is not connected" while sending UDP packet

Hello everyone,
I am using RSMB broker on Ubuntu 14.4 to send UDP packets. I have done bridging in between Mosquitto broker and RSMB broker. When I am sending any UDP packet to RSMB server/broker on specified MQTT-S port, I am facing an error:

20170721 125228.265 CWNAN0075W Socket error 107 (Transport endpoint is not connected) in getpeername for socket 4
20170721 125228.265 CWNAN0021W Badly formed packet on socket 4, peer address unknown; ending connection

If anyone finds a solution to fix this error, please help me to solve this.

Problem with pre-defined topic ids

I have found a issue with pre-defined topic IDs. The {clientid} was not being replaced with the topic name. It is a very small fix. How can I submit my change? (I'm new to github)

Thanks,
Jeff

repeated SUBACKs on same topic send new topic ids

If a client on a noisy network misses a SUBACK packet, it will resend the SUBSCRIBE. Since MQTTSProtocol_handleSubscribes doesn't check if a topic is already registered before registering it, it will send the next SUBACK with a new topic id. But later PUBLISHes on that topic will use the first topic id, which the client doesn't know.

The fix is to use the same check in MQTTProtocol_handleSubscribes that MQTTProtocol_handleRegisters uses to see if a topic is already registered.

Building rsmb with OS X command line tools

Here are the changes I had to make to build rsmb on OS X 10.11.5 running version 7.1.3 of the command line tools, for whoever might find them helpful:

In the makefile, change:
CFLAGS=-Wall
to
CFLAGS=-Wall -D_XOPEN_SOURCE

and in Socket.c on the one line where it occurs, change IPV6_ADD_MEMBERSHIP to IPV6_JOIN_GROUP

mqttsn qos1 never resends

Hi Michal,

I am using your fork of this project to do some testing with mqttsn, and I noticed that the broker does not call MQTTProtocol_retries() for the mqtts clients, like it does for the mqtt clients.

Since you seem to care about this code base I thought I would share this with you. I dont know if this patch is even the bast way to implement the fix, but it seems like it should be ok.

Jeffrey

diff --git a/rsmb/src/MQTTSProtocol.c b/rsmb/src/MQTTSProtocol.c
index 049dc68..f88f991 100644
--- a/rsmb/src/MQTTSProtocol.c
+++ b/rsmb/src/MQTTSProtocol.c
@@ -551,7 +551,22 @@ int MQTTSProtocol_handleConnects(void* pack, int sock, char* clientAddr, Clients
}

    if (existingClient)
  •   {
    
  •           ListElement\* outcurrent = NULL;
    
  •           time_t now = 0;
    
  •           /\* ensure that inflight messages are retried now by setting the last touched time
    
  •            \* to very old (0) before calling the retry function
    
  •            */
    
  •           time(&(now));
    
  •           while (ListNextElement(client->outboundMsgs, &outcurrent))
    
  •           {
    
  •                   Messages\* m = (Messages*)(outcurrent->content);
    
  •                   m->lastTouch = 0;
    
  •           }
    
  •           MQTTProtocol_retries(now, client);
            MQTTProtocol_processQueued(client);
    
  •   }
    
    Log(LOG_INFO, 0, "Client connected to udp port %d from %s (%s)", list->port, client->clientID, clientAddr);
    

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.