1
0
mirror of https://github.com/golang/go synced 2024-11-19 14:54:43 -07:00
The Go programming language
Go to file
Russ Cox c83b838641 package net cleanup
added ReadFrom/WriteTo for packet protocols like UDP.
simplified the net.Conn interface.
added new net.PacketConn interface for packet protocols.
implemented proper UDP listener.

cleaned up LocalAddr/RemoteAddr methods - cache in netFD.

threw away various unused methods.

an interface change:
introduced net.Addr as a network address interface,
to avoid conversion of UDP host:port to string and
back for every ReadFrom/WriteTo sequence.

another interface change:
since signature of Listener.Accept was changing anyway,
dropped the middle return value, because it is available
as c.RemoteAddr().  (the Accept signature predates the
existence of that method.)

Dial and Listen still accept strings, but the proto-specific
versions DialTCP, ListenUDP, etc. take net.Addr instead.

because the generic Dial didn't change and because
no one calls Accept directly (only indirectly via the http
server), very little code will be affected by these interface
changes.

design comments welcome.

R=p
CC=go-dev, r
http://go/go-review/1018017
2009-11-02 18:37:30 -08:00
doc recompress go_talk.pdf by running through ghostscript. 2009-11-02 18:21:16 -08:00
include support for 5.out files 2009-10-19 22:33:56 -07:00
lib rietveld does not like code reviews with subjects longer than 100 characters, so trim the line pulled out of the description to avoid the limit. 2009-11-02 11:37:21 -08:00
misc go-mode for Emacs. This provides basic syntax highlighting 2009-10-22 08:54:26 -07:00
pkg more description 2009-10-15 23:08:46 -07:00
src package net cleanup 2009-11-02 18:37:30 -08:00
test Set LANG to control sorting. This affects the order in which 2009-11-02 13:17:12 -08:00
.hgignore more file patterns to ignore 2009-11-01 05:20:30 -08:00
AUTHORS more explanatory text 2009-10-15 16:51:53 -07:00
CONTRIBUTORS more explanatory text 2009-10-15 16:51:53 -07:00
favicon.ico add a favicon plus a couple of hi-res versions of gordon 2009-10-26 10:13:07 -07:00
LICENSE Add AUTHORS and LICENSE files. 2009-08-13 09:21:28 -07:00