]> Cypherpunks repositories - gostls13.git/commitdiff
net: update documentation for WriteMsgUDP
authorMikio Hara <mikioh.mikioh@gmail.com>
Tue, 10 Feb 2015 10:27:29 +0000 (19:27 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Tue, 10 Feb 2015 22:27:17 +0000 (22:27 +0000)
Change-Id: I69f24887601e491d6d722bfeb2952d927df8ad80
Reviewed-on: https://go-review.googlesource.com/4351
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/udpsock_plan9.go

index 510ac5e4aaa6037b91c32fc084064307680a1fa6..269272632a73ceaaea8065a8e1f2f8e69995e396 100644 (file)
@@ -101,9 +101,11 @@ func (c *UDPConn) WriteTo(b []byte, addr Addr) (int, error) {
        return c.WriteToUDP(b, a)
 }
 
-// WriteMsgUDP writes a packet to addr via c, copying the payload from
-// b and the associated out-of-band data from oob.  It returns the
-// number of payload and out-of-band bytes written.
+// WriteMsgUDP writes a packet to addr via c if c isn't connected, or
+// to c's remote destination address if c is connected (in which case
+// addr must be nil).  The payload is copied from b and the associated
+// out-of-band data is copied from oob.  It returns the number of
+// payload and out-of-band bytes written.
 func (c *UDPConn) WriteMsgUDP(b, oob []byte, addr *UDPAddr) (n, oobn int, err error) {
        return 0, 0, syscall.EPLAN9
 }