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 Issues

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.

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

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?

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

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.