Commit 6226a2f7 authored by Mikio Hara's avatar Mikio Hara

go.net/ipv6: update package documentation

- do word alignment; s/multicast group address/multicast group/

R=dave
CC=golang-dev
https://golang.org/cl/10685046
parent 007cb6a2
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
// net.IPconn which are created as network connections that use the // net.IPconn which are created as network connections that use the
// IPv6 transport. A few network facilities must be prepared before // IPv6 transport. A few network facilities must be prepared before
// you begin multicasting, at a minimum joining network interfaces and // you begin multicasting, at a minimum joining network interfaces and
// group addresses. // multicast groups.
// //
// en0, err := net.InterfaceByName("en0") // en0, err := net.InterfaceByName("en0")
// if err != nil { // if err != nil {
...@@ -72,11 +72,11 @@ ...@@ -72,11 +72,11 @@
// } // }
// defer c.Close() // defer c.Close()
// //
// Second, the application joins groups, starts listening to the // Second, the application joins multicast groups, starts listening to
// group addresses on the specified network interfaces. Note that // the groups on the specified network interfaces. Note that the
// the service port for transport layer protocol does not matter with // service port for transport layer protocol does not matter with this
// this operation as joining groups affects only network and link // operation as joining groups affects only network and link layer
// layer protocols, such as IPv6 and Ethernet. // protocols, such as IPv6 and Ethernet.
// //
// p := ipv6.NewPacketConn(c) // p := ipv6.NewPacketConn(c)
// if err := p.JoinGroup(en0, &net.UDPAddr{IP: group}); err != nil { // if err := p.JoinGroup(en0, &net.UDPAddr{IP: group}); err != nil {
...@@ -135,10 +135,10 @@ ...@@ -135,10 +135,10 @@
// //
// More multicasting // More multicasting
// //
// An application that uses PacketConn may join multiple group // An application that uses PacketConn may join multiple multicast
// addresses. For example, a UDP listener with port 1024 might join // groups. For example, a UDP listener with port 1024 might join two
// two different groups across over two different network interfaces // different groups across over two different network interfaces by
// by using: // using:
// //
// c, err := net.ListenPacket("udp6", "[::]:1024") // c, err := net.ListenPacket("udp6", "[::]:1024")
// if err != nil { // if err != nil {
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
// } // }
// //
// It is possible for multiple UDP listeners that listen on the same // It is possible for multiple UDP listeners that listen on the same
// UDP port to join the same group address. The net package will // UDP port to join the same multicast group. The net package will
// provide a socket that listens to a wildcard address with reusable // provide a socket that listens to a wildcard address with reusable
// UDP port when an appropriate multicast address prefix is passed to // UDP port when an appropriate multicast address prefix is passed to
// the net.ListenPacket or net.ListenUDP. // the net.ListenPacket or net.ListenUDP.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment