i'm able to setup a connection and pass messages, the problem is that when
the sender is another julia process, and that process exits, the receiver
is spammed with an infinite number of empty lines. how does one exit
cleanly? is there a disconnect() command? code below. thanks
========== first do this in one julia process ==========
julia> @async begin
server = listen(2001)
while true
sock = accept(server)
@async while true
println(strftime(time())*": "*readline(sock))
end
end
end
Task (waiting) @0x00007fb9e7803480
julia> Tue Dec 23 07:43:28 2014: foo
Tue Dec 23 07:43:29 2014:
Tue Dec 23 07:43:35 2014:
Tue Dec 23 07:43:35 2014:
Tue Dec 23 07:43:35 2014:
Tue Dec 23 07:43:35 2014:
========== then do this in a second julia process ======
julia> sock = connect(2001)
TCPSocket(open, 0 bytes waiting)
julia> println(sock,"foo")
julia> <ctrl-D> # note all the output in the process above following this