[MOD] filees to understand networking and added some connection examples

This commit is contained in:
Eduardo Cueto Mendoza 2020-05-09 20:48:29 -06:00
parent 7344cc6830
commit 0cb62245ce
3 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,4 @@
conn = connect(1234)
conn = connect(1234) # Defaults lo localhost
write(conn, "Hello world!\n")
@ -14,3 +14,4 @@ end
t = Task(foo)
consume(t)

5
13_connection2server.jl Normal file
View File

@ -0,0 +1,5 @@
conn = connect(1234)
println(conn, "hello world")
readline(conn)

View File

@ -1,3 +1,4 @@
# Asyncronous connection server
@async begin
server = listen(1234)
while true