1
0
mirror of https://github.com/golang/go synced 2024-10-04 20:21:22 -06:00
go/src/pkg/http
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
..
client_test.go unused imports 2009-09-17 10:27:04 -07:00
client.go publish Request.Write (rename from Request.write) 2009-10-23 14:19:47 -07:00
fs.go reverse the arguments to io.Copy so the destination is on the 2009-11-01 20:59:49 -08:00
Makefile convert non-low-level non-google pkg code 2009-08-12 13:19:17 -07:00
request_test.go test and fix http redirect handling 2009-10-19 12:10:14 -07:00
request.go publish Request.Write (rename from Request.write) 2009-10-23 14:19:47 -07:00
server.go package net cleanup 2009-11-02 18:37:30 -08:00
status.go mv src/lib to src/pkg 2009-06-09 09:53:44 -07:00
triv.go reverse the arguments to io.Copy so the destination is on the 2009-11-01 20:59:49 -08:00
url_test.go more "declared and not used". 2009-09-15 09:41:59 -07:00
url.go apply gofmt to go, gob, hash, http, image, io, json, log 2009-10-06 19:41:51 -07:00