Socket
In Jolie a socket location defines a TCP/IP network socket.
Socket location name in Jolie port definition is socket.
A socket location is an address expressed as a URI in the form socket://host:port/path, where:
hostidentifies the system running the Jolie program. It can be either a domain name or an IP address;portdefines the port on which the communication takes place.
The couple host:port represents an authority, where:
pathcontains the path that identifies the Jolie program in the scope of an authority.
Local and remote socket locations
Sockets can identify:
- Local socket address, used when the communication is directed to a program running on the same location of the sender, i.e.,
socket://(localhost|127.0.0.1):port_number/path; - Remote socket address, used when the communication is directed to a program running on a remote location from the sender. In this case
host_names can be used in order to identify the resource via a Domain Name System, e.g.,www.google.com:80and173.194.71.147:80point to the same location, i.e.,socket://(host_name|IP_address):port_number/path.