From a9a6757c64329cb8e14a5a88df4371089b79644b Mon Sep 17 00:00:00 2001 From: Mikio Hara Date: Tue, 10 Feb 2015 19:27:29 +0900 Subject: [PATCH] net: update documentation for WriteMsgUDP Change-Id: I69f24887601e491d6d722bfeb2952d927df8ad80 Reviewed-on: https://go-review.googlesource.com/4351 Reviewed-by: Ian Lance Taylor --- src/net/udpsock_plan9.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/net/udpsock_plan9.go b/src/net/udpsock_plan9.go index 510ac5e4aaa603..269272632a73ce 100644 --- a/src/net/udpsock_plan9.go +++ b/src/net/udpsock_plan9.go @@ -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 }