Sockets: Difference between revisions

128 bytes added ,  11 years ago
added Julia implementation of Sockets
(added racket)
(added Julia implementation of Sockets)
Line 453:
}</lang>
Encapsulating the <code>Socket</code>'s <code>OutputStream</code> in a <code>PrintStream</code> (for data) or <code>PrintWriter</code> (for text) may be easier in more complex programs for their auto-flush abilities, encoding management, and their overloaded <code>print</code> and <code>println</code> methods. The <code>write</code> method from the original <code>OutputStream</code> will still be available.
 
=={{header|Julia}}==
<lang Julia>
socket = connect("localhost",256)
write(socket, "hello socket world")
close(socket)
</lang>
 
=={{header|Lua}}==
Requires: LuaSocket