aboutsummaryrefslogtreecommitdiff
path: root/examples/client.sloth
diff options
context:
space:
mode:
authorNic Gaffney <gaffney_nic@protonmail.com>2023-06-28 23:55:00 -0500
committerNic Gaffney <gaffney_nic@protonmail.com>2023-06-28 23:55:00 -0500
commitdd3906c96555805af2580d593cf9429170b07a02 (patch)
treea2f3974b325e4b31d3833a828dec7447108c0fb1 /examples/client.sloth
parentc4d6a1229c35cc889a1db53cf1c9d87d2f662238 (diff)
downloadsloth-dd3906c96555805af2580d593cf9429170b07a02.tar.gz
sockets
Diffstat (limited to 'examples/client.sloth')
-rw-r--r--examples/client.sloth9
1 files changed, 9 insertions, 0 deletions
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;
+}