项目作者: azdle

项目描述 :
A rust coap server framework. (Oh hold, doing lower level work on tokio-coap first.)
高级语言: Rust
项目地址: git://github.com/azdle/bronze.git
创建时间: 2016-03-11T04:23:47Z
项目社区:https://github.com/azdle/bronze

开源协议:

下载


Bronze

Build Status
Crates.io Link

Bronze is a CoAP framework generally
aimed at making high performance CoAP servers. It’s not currently intended for
use on especially resource constrained devices, but that is a long-term goal.

Bronze is written using mio for all network requests, this means that it has
very low overheads and it should be possible to make it into a very fast and
efficient system.

Status

Bronze is incomplete and you likely shouldn’t use it.

Currently it is possible to create servers that directly deal with incoming
CoAP packets, but there is not yet any automatic handling of retries or
multi-packet messages.

There is not yet any implementation of client requests.

No benchmarks have been done to determine if Bronze in it’s current state is as
fast as it could be.

Getting Started

To use Bronze, add the following to your Cargo.toml:

  1. [dependencies]
  2. bronze = "0.1"

Then you’ll need to create a run the server, a simple example of this would be:

  1. extern crate bronze;
  2. use bronze::endpoint::Endpoint;
  3. use bronze::nullhandler::NullHandler;
  4. fn main() {
  5. let local_addr = "127.0.0.1:5683".parse().unwrap();
  6. println!("CoAP Server Listening on {}", local_addr);
  7. Endpoint::new(local_addr).run(NullHandler);
  8. }

This example uses the included NullHandler which is an example of how to write
a message handler. NullHandler simply replies to any valid CoAP packets that
would expect a response with a RST message.