Skip to content

Commit

Permalink
Little bit of cleanup for manual (#25090)
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt authored and KristofferC committed Dec 15, 2017
1 parent 5e1418b commit b389c92
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions doc/src/manual/networking-and-streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ All Julia streams expose at least a [`read`](@ref) and a [`write`](@ref) method,
stream as their first argument, e.g.:

```julia-repl
julia> write(STDOUT,"Hello World"); # suppress return value 11 with ;
julia> write(STDOUT, "Hello World"); # suppress return value 11 with ;
Hello World
julia> read(STDIN,Char)
julia> read(STDIN, Char)
'\n': ASCII/Unicode U+000a (category Cc: Other, control)
```
Expand Down Expand Up @@ -49,7 +49,7 @@ However, since this is slightly cumbersome, there are several convenience method
example, we could have written the above as:

```julia-repl
julia> read(STDIN,4)
julia> read(STDIN, 4)
abcd
4-element Array{UInt8,1}:
0x61
Expand Down Expand Up @@ -92,7 +92,7 @@ Note that the [`write`](@ref) method mentioned above operates on binary streams.
values do not get converted to any canonical text representation but are written out as is:

```jldoctest
julia> write(STDOUT,0x61); # suppress return value 1 with ;
julia> write(STDOUT, 0x61); # suppress return value 1 with ;
a
```

Expand Down Expand Up @@ -167,7 +167,7 @@ julia> open(read_and_capitalize, "hello.txt")
"HELLO AGAIN."
```

to open `hello.txt`, call `read_and_capitalize on it`, close `hello.txt` and return the capitalized
to open `hello.txt`, call `read_and_capitalize` on it, close `hello.txt` and return the capitalized
contents.

To avoid even having to define a named function, you can use the `do` syntax, which creates an
Expand Down Expand Up @@ -290,10 +290,10 @@ julia> close(clientside)

One of the [`connect`](@ref) methods that does not follow the [`listen`](@ref) methods is
`connect(host::String,port)`, which will attempt to connect to the host given by the `host` parameter
on the port given by the port parameter. It allows you to do things like:
on the port given by the `port` parameter. It allows you to do things like:

```julia-repl
julia> connect("google.com",80)
julia> connect("google.com", 80)
TCPSocket(RawFD(30) open, 0 bytes waiting)
```

Expand Down

0 comments on commit b389c92

Please sign in to comment.