From dd3906c96555805af2580d593cf9429170b07a02 Mon Sep 17 00:00:00 2001 From: Nic Gaffney Date: Wed, 28 Jun 2023 23:55:00 -0500 Subject: sockets --- examples/client.sloth | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 examples/client.sloth (limited to 'examples/client.sloth') diff --git a/examples/client.sloth b/examples/client.sloth new file mode 100644 index 0000000..8b7f737 --- /dev/null +++ b/examples/client.sloth @@ -0,0 +1,9 @@ +fn main() Int { + var sockint: Int = clientsock(); + println(recvsock(sockint)); + while true { + sendsock(readln(), sockint); + } + closesock(sockint); + return 0; +} -- cgit v1.2.3