Code Monkey home page Code Monkey logo

swiftcoap's People

Contributors

danieleftodi avatar oneam avatar stuffrabbit 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  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  avatar  avatar  avatar

swiftcoap's Issues

CoAPs?

Looks like it's not supported at the moment. How difficult would it be to add?

Execute request from Lwm2m server

Hi,

I am wondering how to use SwiftCoap protocol, when I want to make a higher layer call?

Let's assume I implement an LWM2M server in an iOS app. The LWM2M server will be setup together with your nice SwiftCoAP implementation, which I setup as CoAP server. The LWM2M operations "register" and "unregister" operations that a LWM2M client can send to my LWM2M server are clear how to handle, since they are incoming requests to the server.

But outgoing requests, like LWM2M operation "execute" which the LWM2M server shall send to a LWM2M client, how do you suggest that I shall use SwiftCoAP to do that? Shall the LWM2M server suddenly setup your code as a CoAP client to do that, whilst in normal case for incoming requests, where it is a CoAP server?

iOS 10 breaks the App

Unfortunately this great App doesn't work with iOS 10.1 anymore. Would be great (again ;-) if this issue can be fixed.

Apple validation

Hi, I would like to know if there is any issue using this library and Apple validation (Specially regarding security) ?

Question: Implementing Bluetooth Low Energy Transport

Hi, I'm looking for a CoAP library for iOS which can handle non-IP transports, in this case Bluetooth Low Energy (BLE).

My question is, If I were to write a custom SCCoAPTransportLayerProtocol for BLE using a CBPeripheral's address 128bit UUID as the address with port 0, would any of the source need to be modified? That is, can the SwiftCoAP handle non-IP addresses?

Another option would be to map the CBPeripheral's address to an IP address to use with SwiftCoAP if necessary.

Let me know what you think.

Thanks,
Brian

Issue found in multi-threaded environment, when multiple request and responses are processed in parallel

Hi,

We are using this library in our app and it works great! However, we are facing following issues while using the library in a multi-threaded environment, when multiple request and responses are sent in parallel:

Block 2 request is sent based on last request which is sent from library. It should be sent on the basis of latest block response received. When library receives any new block, it is creating a new request for getting its next block. This next block request should be created on the basis of block 1 which is just received. Instead, it is creating next block request on the basis of an old request (pendingCoAPMessageInTransmission) which is sent from library. This old request could be of any other request rather from the block received.

isMessageInTransmission variable is a shared variable in library. This is limitation in which if there are multiple request response done in parallel, we will not get correct state of isMessageInTransmission. If there are 2 message sent in parallel, we are not getting correct in transmission state.

Individual Blocks are received in application from the library. And app needs to append all blocks and create complete response. Instead, Library should handle all blocks and share complete response with app once all blocks are received.

Retransmitted response is not handled by the library. Application needs to check whether response is retransmitted or new one and then use the response based on the message ID. Library should discard response if app has already processed it or if it has already sent the same response to the app.

These are not fixed in the new Swift Library also.

Thanks!

SwiftCoAP + LWM2M?

Hi Stuffrabbit,

I like your CoAP implementation of Swift and it seems to work fine when trying out your CoAP server implementation together with this CoAP client in the Firefox webbrowser:
https://addons.mozilla.org/en-US/firefox/addon/oma-lwm2m-devkit/

Now my questioN:

  1. Have you made any integrations with LWM2M with your CoAP library?

LWM2M implementations:
https://github.com/eclipse/wakaama (Implemented in C)
https://github.com/FlowM2M/AwaLWM2M (Implemented in C)
https://github.com/eclipse/leshan (Implemented in Java)
according to:
https://en.wikipedia.org/wiki/OMA_LWM2M

Maybe you've built wakamaa as a iOS-library (so its still C code), but with integration to SwiftCoAP?

  1. and/or maybe you have started to port some parts of Wakamaa or Leshan to Swift? I.e some of the client or server LWM2M-parts?

Objective-C interface support

I'm trying to try out SwiftCoAP with Objective-C. Are there any examples of how to send requests / act as a server bridged from Objective-C.

Many compiler warnings for Swift3

Hi Stuffrabbit,

I like your CoAP implementation of Swift.

But when using XCode 7.3 it seems to already have support for Swift3, i.e next version after Swift2.2. Thus when using SCClient, SCServer or SCMessage about 20 compiler warnings appear, for example:

  • SCClient.swift:208:129: Use of string literal for Objective-C selectors is deprecated; use '#selector' instead
  • SCClient.swift:205:34: '++' is deprecated: it will be removed in Swift 3
  • SCMessage.swift:574:67: 'init(start:end:)' is deprecated: it will be removed in Swift 3. Use the '..<' operator.
  • 'sendAsynchronousRequest(_:queue:completionHandler:)' was deprecated in iOS 9.0: Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h

Will you make an update of SwiftCoAP to fix those compiler warnings?

See here for more details about Swift 3:
https://github.com/apple/swift-evolution
https://swift.org/blog/swift-3-api-design/

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.