std/io/net¶
module io.net
Network endpoints: transports, read and written by source, tap,
target and sink like any other endpoint (module io). Constructing
one sends nothing: the request a program describes happens when a
source, tap, target or sink uses it, and only if the host grants the
network to that program. A document reaches no network. A program
imports the module: import net.
Http— An HTTP resource aturl.WebSocket— A WebSocket connection tourl: each message is a document, read as it arrives and written as it is sent.Socket— A TCP connection tohostonport.http— The HTTP resource aturl, as anHttpendpoint:methodis the request a write sends,"GET"unless given, andheadersa map of header names to values sent with every request.websocket— The WebSocket aturl, as aWebSocketendpoint.socket— The TCP endpointhostonport, as aSocket.