accept
accept(server[,client])
Accepts a connection on the given server and returns a connection to the client. An uninitialized client stream may be provided, in which case it will be used instead of creating a new stream.
Examples
A simple TCP server
julia> @async begin
server = listen(2000)
while true
sock = accept(server)
println("Hello World")
end
end
Task (waiting) @0x000000000023286b0
julia> client = connect(2000);
Hello World
julia> close(client)
See Also
accept, bind, :@spawn, connect, fetch, getaddrinfo, gethostname, getipaddr, getsockname, init_worker, IPv4, IPv6, isready, issocket, kill, listen, recv, recvfrom, remotecall, remotecall_fetch, remotecall_wait, RemoteRef, send, setopt,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.