• Russ Cox's avatar
    package net cleanup · c83b8386
    Russ Cox authored
    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
    c83b8386
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libcgo Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.386 Loading commit data...
Make.amd64 Loading commit data...
Make.arm Loading commit data...
Make.cmd Loading commit data...
Make.conf Loading commit data...
Make.pkg Loading commit data...
all-arm.bash Loading commit data...
all-nacl.bash Loading commit data...
all.bash Loading commit data...
clean.bash Loading commit data...
make-arm.bash Loading commit data...
make.bash Loading commit data...
quietgcc.bash Loading commit data...
run.bash Loading commit data...
sudo.bash Loading commit data...