Giter VIP home page Giter VIP logo

bridge-tester's Introduction

Bridge Tester

A minimal implementation of the subscriber/publisher client to interact with the Bridge server. Demo can be seen here.

Build

Clone or download the repository and run make to create the executable publisher and subscriber.

Usage

Subscriber

The subscriber needs to handle the heartbeat message before receiving the message from the Bridge server to handle dead connections. Then, the actual message will be posted with 2 bytes of header indicating the size of data to be transmitted. After all the data has been transmitted from the publisher, to the Bridge server, to the subscriber, the last message will be a \r\n\r\n similar to HTTP.

./subscriber <ip> <port> <topic> [<file>]

The ip and port are the address of the Bridge server. The topic is the topic to subscribe to. The subscriber will automatically parse it to a length that is acceptable for the Bridge server. The optional argument file indicate the output file that the contents of the published message will be written to.

Publisher

Publisher is more simple compared to the subscriber as it only needs to send the message and handle the acknowledgement from the Bridge server just to control the flow between the publisher, Bridge server, and the subscriber. This step is necessary as the bandwidth may differ (ex. the subscriber may be a low-end device) and we don't want to bombard the network with messages although TCP handles congestion/flow control.

./publisher <ip> <port> <topic> <file>

Same as the subscriber, it takes the ip and port of the Bridge server and also the topic of interest to publish to. The last argument file is the name of the file that contains the message to publish to the Bridge server. On a successful operation, the program will output the total number of bytes sent.

License

MIT

bridge-tester's People

Contributors

thinkty avatar

Watchers

 avatar

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.