Fixed net examples, updated copyright year.
h3rald h3rald@h3rald.com
Wed, 22 Feb 2023 05:09:33 +0000
2 files changed,
5 insertions(+),
5 deletions(-)
M
site/contents/reference-net.md
→
site/contents/reference-net.md
@@ -18,7 +18,7 @@ > > Example
> > > > The following code shows how to send a message to a server running on localhost:7777. The message is passed as the first argument to the program. > > -> > {} socket "localhost" 7777 connect =cli +> > {} socket "localhost" 7777 connect :cli > > > > args 1 get :msg > >@@ -44,11 +44,11 @@ > > Example
> > > > The following code shows how to create a simple server that listens on port 7777, prints data received from clients, and exits when it receives the string `exit`: > > -> > {} socket {"127.0.0.1" :address 7777 :port} listen =srv +> > {} socket {"127.0.0.1" :address 7777 :port} listen :srv > > > > "Server listening on localhost:7777" puts! > > -> > {} socket =cli +> > {} socket :cli > > "" :line > > (line "exit" !=) > > (@@ -74,7 +74,7 @@ > >
> > The following code shows how to make a simple GET request to <http://httpbin.org/uuid> to receive a random UUID and display its response: > > > > -> > {} socket "httpbin.org" 80 connect =cli +> > {} socket "httpbin.org" 80 connect :cli > > > > cli "GET /uuid HTTP/1.1\r\nHost: httpbin.org\r\n\r\n" send > >