Commit Graph

11 Commits (a534c20a1745a4162158dda36247e6327c50b18a)

Author SHA1 Message Date
Christopher Haster f567252d3a Coalesce redundant events to reduce cpu usage in lazy implementations
*cough* esp8266 *cough*

this is especially important for event-loop based systems where
excessive events results in problematic memory consumption.
2016-06-06 16:35:12 -05:00
Russ Butler b15e2c293e Add synchronization to the network socket API
Add mutexes to protect the network socket API.  Also use semaphores to
wait for read/write events.  Also fix a typo in the comments for
timeout.
2016-05-15 18:03:48 -05:00
Christopher Haster bcab0fcef5 Added WFI to save power in temporary polling implementation 2016-05-13 11:41:15 -05:00
Christopher Haster 5475dd0404 Consolidate set_timeout/set_blocking behaviour
- Avoids ambiguity when both are used
- Matches Python behaviour
2016-05-13 11:41:14 -05:00
Christopher Haster 16929af278 Rename Interface -> Stack
NetworkInterface  -> NetworkStack
EthernetInterface -> EthernetStack
WiFiInterface     -> WiFiStack
CellularInterface -> CellularStack
MeshInterface     -> MeshStack
2016-05-13 11:41:07 -05:00
Christopher Haster eab6d775ac Removed is_connected function
- Not supported by TCP/UDP protocols
- Uncommon and less useful with proper error handling
2016-05-13 11:41:04 -05:00
Christopher Haster 141b245dfc Added better support for SocketAddress/string addresses/ports 2016-05-13 11:40:57 -05:00
Christopher Haster c33d246fa6 Move to single state-change interrupt
Pros
- Easier to implement
- More similar to SIGIO in BDS sockets

Cons
- Less information, but this information had a high risk of being
  faulty/spurious
2016-05-13 11:40:52 -05:00
Christopher Haster 71efccb1e8 Add open call as alternative to passing NetworkInterface at construction
Pros
- Allows memory to be statically allocated
- Avoids issues with Thread creation before entering main
- Matches existing APIs such as FunctionPointer and Ticker

Cons
- Does not enforce passing a NetworkInterface
2016-05-13 11:40:50 -05:00
Christopher Haster 8a5121aaff Reverted merge of FuncPtr (#10)
Replaced FuncPtr with FunctionPointer in NSAPI
2016-04-06 11:23:42 -05:00
Christopher Haster 03475f35bb Matched changes NetworkSocketAPI
Responded to feedback from mbed-client implementation
to introduce a full feature set that should support most
of the use cases for the API.
2016-04-06 08:50:56 -05:00