Code Monkey home page Code Monkey logo

Comments (4)

Topener avatar Topener commented on July 20, 2024

Hi @dalabarge, thanks for the ticket. As this isn't a very actively monitored channel I hope you've found your answer in the meantime. Have you looked at https://github.com/appcelerator-modules/titanium-socketio?

I recommend https://tislack.org for interacting with the community if you're not already in there.

from titanium_mobile.

dalabarge avatar dalabarge commented on July 20, 2024

Thanks @Topener It's not a problem with the TCP communication itself however. The problem is that initiating communication with a remote IP and port for the TCP socket must go over a network interface. On a smart phone there's the cellular modem and the wireless modem at a minimum. I need to force wireless modem as cellular will never find a local wireless access point as it's an independent cellular network.

For example you connect to your IoT device's wireless then initiate some TCP communication but if you can't force TCP network binding to use the wireless connection then based on speed or other factors your "smart" phone might decide to use cellular and you'll get connection issues. Disabling cellular fixes this by forcing only one network interface to be available but I'm looking for programmatic control over this.

Neither Titanium.Network nor SocketIO appear to have this functionality exposed. Socket.io doesn't because it's handling the socket layer not the network layer much like Titanium.Network.TCP. So I'm wondering how you'd use Titanium SDK to setup the a WiFi network-only TCP socket? I know how to get the type of network and can abort if currently connected over cellular, but is there a way to force or bind the socket to the WiFi network?

from titanium_mobile.

Topener avatar Topener commented on July 20, 2024

Thanks for the clarification! I am unaware of this functionality in Titanium indeed. If the functionality is supported natively on iOS & Android we are happy to merge in a PR exposing this to Ti.Network.

I'll shoot you an email to communicate further about the topic.

from titanium_mobile.

MyStarrySkies avatar MyStarrySkies commented on July 20, 2024

Hello, do you have such problems?As mentioned above, in the case of both WiFi and cellular networks, let the smartphone select only WiFi for communication.But above Android 9.0, it seems that mandatory use of WiFi cannot be realized in this way. Do you have such problems?

from titanium_mobile.

Related Issues (20)

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.