Family Day update

This commit is contained in:
Ingy döt Net 2020-02-17 23:21:07 -08:00
parent aac6731f2c
commit 9ad63ea473
2442 changed files with 39761 additions and 8255 deletions

View file

@ -1,12 +1,13 @@
import system'net.
import system'text.
import extensions'text.
import system'io.
import system'net;
import system'text;
import extensions'text;
import system'io;
public program
[
var socket := Socket new(AF_INET,SOCK_STREAM,IPPROTO_TCP).
socket connect("127.0.0.1",256).
socket write(AnsiEncoder toByteArray("hello socket world")).
socket close.
]
public program()
{
var socket := new Socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
socket.connect("127.0.0.1",256);
var s := "hello socket world";
socket.write(AnsiEncoder.toByteArray(0, s.Length, s));
socket.close()
}

3
Task/Sockets/R/sockets.r Normal file
View file

@ -0,0 +1,3 @@
s <- make.socket(port = 256)
write.socket(s, "hello socket world")
close.socket(s)