Coder Social home page Coder Social logo

koenlav / cordova-plugin-chrome-apps-sockets-tcp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mobilechromeapps/cordova-plugin-chrome-apps-sockets-tcp

17.0 7.0 15.0 178 KB

License: Other

JavaScript 39.67% Java 36.85% Objective-C 23.47%

cordova-plugin-chrome-apps-sockets-tcp's Introduction

chrome.sockets.tcp Plugin

This plugin provides TCP client sockets for Android and iOS.

Status

Beta on Android and iOS.

Reference

The API reference is here.

Release Notes

1.3.9 (Sep 12, 2017)

  • Fix connect() not firing when failed on iOS
  • Fix write not triggering reading bytes on iOS

1.3.7 (Jan 31, 2017)

  • Fix disconnect() sometimes not disconnecting on iOS

1.3.6 (Aug 12, 2016)

  • Fix connect() being run on UI thread (Android)

1.3.5 (Aug 10, 2016)

  • Better TLS handling in Android implementation

1.3.4 (May 29, 2015)

  • Fix writes being silently truncated when sending large ArrayBuffers
  • Fix a case of busy-waiting (yikes!)
  • Increase socket read buffer size from 4k -> 32k to match write buffer size

1.3.3 (April 30, 2015)

  • Renamed plugin to pubilsh to NPM

1.3.2 (Mar 17, 2015)

  • ios: Fix warning about unsigned -> int

1.3.1 (Jan 27, 2015)

  • Fix ssl handshake infinite loop & return error when address is unresolvable
  • chrome.sockets.pipeToFile: send receive events at most 10 times per sec

1.3.0 (Nov 26, 2014)

  • Added mobile-only chrome.sockets.tcp.pipeToFile API
  • android sockets.tcp: send an error when receive EOF

1.2.0 (November 17, 2014)

  • Remove unnecessary headers for chrome.sockets.* - ios
  • Fix possible blocks leak memory
  • sockets.tcp - redirect to file for iOS & Android
  • Fixed chrome.sockets.udp socket close with error problem
  • chrome.sockets: open selector in selector thread
  • Fix auto tests & resumeRead accidentally read paused or unconnected sockets on iOS
  • Improve chrome.sockets.tcp throughput for iOS & Android
  • Fix setPaused for iOS
  • Add setKeepAlive and setNoDelay for Android
  • Don't modify interest set when key is invalid (fix #388)

1.1.0 (October 24, 2014)

  • Add chrome.sockets.secure.tcp and refactor chrome.sockets.*

1.0.1 (October 23, 2014)

  • Fix a NullPointerException on Android
  • Fix the dependency on iosSocketsCommon so that it works with the Cordova plugin registry.

1.0.0 (October 21, 2014)

  • Initial release

cordova-plugin-chrome-apps-sockets-tcp's People

Contributors

agrieve avatar clelland avatar codlab avatar earmstrong1990 avatar fredrikeldh avatar garethwhittaker avatar jpchase avatar kamrik avatar koenlav avatar larssn avatar mmocny avatar oahziur avatar profonno avatar

Stargazers

 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

cordova-plugin-chrome-apps-sockets-tcp's Issues

on IOS socket is not staying open

I have a tcp socket connection I am making to a device and am using this tool to stream data to an app. It makes two types of calls to the socket -

1 is for a small message that tells it the write and read pointer locations of data on the device - this message is around 30 chars

2 A continous stream of data sent from the device back to the app

On android it works flawlessly - however on IOS the socket receives the pointer message fine but when trying to stream data stops receiving data after three bursts. You can see the three dsata bits it will typically receive.

There is no close event or disconnect event being triggered.

I have tried setting the chrome.sockets.tcp.setKeepAlive to TRUE but this doesnt seem to do anything.

Any help would be appreciated


Sample log

d10DataListener || LOG | self.d10DataListener Start
TCP SOCKET CLIENT ON RECEIVE DATA : 111111,2904181734,101365,9796,2,143,0,640,79,40,3530,3585,56,293,640,3530,53336900

d10DataListener || LOG | self.d10DataListener Start
TCP SOCKET CLIENT ON RECEIVE DATA : 0,-61337000,1070,2000],[111111,2904181734,101366,9796,2,143,0,6

d10DataListener || LOG | self.d10DataListener Start
TCP SOCKET CLIENT ON RECEIVE DATA : 40,79,40,3530,3579,56,293,

d10DataListener || LOG | self.d10DataListener Start

ios: problem when validating the app

Hello,

I'm experiencing this issue on app publishing:

The app references non-public selectors in Payload/ newSocketQueueForConnectionFromAddress:onSocket:, socket:didAcceptNewSocket:, socket:didReadPartialDataOfLength:tag:, socket:didReceiveTrust:completionHandler:, socket:didWritePartialDataOfLength:tag:, socket:shouldTimeoutReadWithTag:elapsed:bytesDone:, socket:shouldTimeoutWriteWithTag:elapsed:bytesDone:, socketDidCloseReadStream:

That have been also reported here:

robbiehanson/CocoaAsyncSocket#672

I've already tried to pull files from CocoaAsyncSocket in "third_party" folder (of "cordova-plugin-chrome-apps-iossocketscommon"), but it doesn't help.

Do anybody else had the same warning?

Many thanks
Cheers,
Francesco

Issues w/ Ionic 3

I'm unable to get this plugin to work in Ionic 3. I'm doing the following steps:

// 1) Add plugin.
cordova plugin add cordova-plugin-chrome-apps-sockets-tcp

// 2) Use the plugin.
    this.platform.ready()
      .then((readySource) => {
        if (readySource == 'cordova') {
          // This will throw an error (chrome is undefined)
          (<any>window).chrome.tcp.socket.create();
        }
      });

I get "chrome" is not defined. Any suggestions?

Connection Time Out after few seconds of connect attempt

Hello,
I've tried this plugin with several Android devices and it always worked perfectly.
While using it with a Xiaomi Mi A2 Lite, it gives result -104 on the connect method and throws a "Connection timed out" error.
Why this difference among devices?
Is there something I can do to increase the connection timeout limit?
Thanks.

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.