Skip to content
Jérémie Magnette edited this page Dec 21, 2015 · 4 revisions

Sockets are the TCP/IP stack endpoint to communicate with the application code. Each socket describes communication between one specific service in the application to a remote task address in the network. In picoTCP, sockets objects are described by the pico_socket object. Each socket is referring to the protocols it belongs to, in particular at networking and transport layer. This allows the definition of a native socket API which is based on stack events. After the socket is created and initialized, a callback is associated to it and it is called by the stack main loop whenever the state of the socket changes, or an external event occurs. The API documentation is fully covered in the user manual, which also gives an overview of the features currently implemented. The native socket API provided by picoTCP allows to write event-based applications as well as an easy transformation of the socket interface into a fully-compliant POSIX API, which also offers support for blocking calls. Such an interface is distributed separately from the core stack, in the repository picotcp-bsd .

Clone this wiki locally