Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Force socketFree() when the socket is remotely closed on Electron #885
@m-mcgowan Sure! The idea is to use up all of the sockets fictitiously by just creating them, with no intension of using them. Then let the system try to connect to the Cloud. Under this case, it will need a socket, and none will be available. To recover currently it tries to "reboot" the networking device by power cycling it. This is gracefully handled with the cellular modem with AT commands. In that process of powering off, the modem must send some signal in the background that closes open sockets with the cellular network. The observed outcome of that is that we receive a remote socket closed URC, which we can use to fix up our locally stored "state" of the available sockets.
Feature: Cloud Socket
Background: A connected device
Scenario: The system will automatically recover and connect to the Cloud even when all TCP socket types are in use
Scenario: The system will automatically recover and connect to the Cloud even when all UDP socket types are in use
Scenario: The system will automatically recover and connect to the Cloud even when a mix of all sockets types are in use
Thanks for the explanation - makes perfect sense! Great to start thinking about how we start implementing those tests. In fact, since the device does this standalone, we could in principle write them now in the
The photon has different limits and behavior so some parts of this will be platform-specific. Even so, having this working on just the Electron would be a huge first step!
To start coding this in the no_fixture repo, we can take each step and code it as a function. E.g.