At a somewhat lower level in the OSI model than HTTP clients and servers, we find sockets. They also enable interprocess communications across a network between clients and servers and are implemented on top of the TCP/IP. The classes that offer that functionality can be again found in
dart:io as follows:
Socket: This is used by a client to establish a connection to a server
ServerSocket: This is used by a server to accept client connections
The following steps will show you how to make a server socket work:
import 'dart:io'; import 'dart:convert'; InternetAddress HOST = InternetAddress.LOOPBACK_IP_V6; const PORT = 7654; void main() ...