EasySocket is a simple, high-level interface to the RISC OS Socket handling SWIs. It provides an abstraction layer that allows applications to perform network operations without dealing with the complexities of the underlying TCP/IP stack directly.
The module manages two primary types of objects: sockets and monitors. Sockets represent network connections or listening points, while monitors provide a mechanism for multitasking applications to wait for events on those sockets using pollwords.
The module is designed to be easy to use from high-level languages like BBC BASIC, providing string-oriented operations like
The module maintains an internal list of active socket handles. Each handle is a pointer to a workspace block containing the socket's state, buffers, and metadata. Handles are validated using a magic number (&hex;FEEF1EF0).
A socket can be in one of several states, which can be queried via
All socket operations are performed in non-blocking mode. Connection establishment and DNS resolution (via the Resolver module) occur asynchronously. Applications should poll
Monitors allow Wimp applications to use
© Justin Fletcher, 2026.