Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



The socket package

import "appengine/socket"

Introduction

Package socket provides outbound network sockets.

Index

func LookupIP(c appengine.Context, host string) (addrs []net.IP, err error)
type Conn
func Dial(c appengine.Context, protocol, addr string) (*Conn, error)
func DialTimeout(c appengine.Context, protocol, addr string, timeout time.Duration) (*Conn, error)
func (cn *Conn) Close() error
func (cn *Conn) LocalAddr() net.Addr
func (cn *Conn) Read(b []byte) (n int, err error)
func (cn *Conn) RemoteAddr() net.Addr
func (cn *Conn) SetContext(c appengine.Context)
func (cn *Conn) SetDeadline(t time.Time) error
func (cn *Conn) SetReadDeadline(t time.Time) error
func (cn *Conn) SetWriteDeadline(t time.Time) error
func (cn *Conn) Write(b []byte) (n int, err error)

func LookupIP

func LookupIP(c appengine.Context, host string) (addrs []net.IP, err error)

LookupIP returns the given host's IP addresses.

type Conn

type Conn struct {
    // contains filtered or unexported fields
}

Conn represents a socket connection. It implements net.Conn.

func Dial

func Dial(c appengine.Context, protocol, addr string) (*Conn, error)

Dial connects to the address addr on the network protocol. The address format is host:port, where host may be a hostname or an IP address. Known protocols are "tcp" and "udp". The returned connection satisfies net.Conn, and is valid while c is valid; if the connection is to be used after c becomes invalid, invoke SetContext with the new context.

func DialTimeout

func DialTimeout(c appengine.Context, protocol, addr string, timeout time.Duration) (*Conn, error)

DialTimeout is like Dial but takes a timeout. The timeout includes name resolution, if required.

func (*Conn) Close

func (cn *Conn) Close() error

func (*Conn) LocalAddr

func (cn *Conn) LocalAddr() net.Addr

func (*Conn) Read

func (cn *Conn) Read(b []byte) (n int, err error)

func (*Conn) RemoteAddr

func (cn *Conn) RemoteAddr() net.Addr

func (*Conn) SetContext

func (cn *Conn) SetContext(c appengine.Context)

SetContext sets the context that is used by this Conn. It is usually used only when using a Conn that was created in a different context, such as when a connection is created during a warmup request but used while servicing a user request.

func (*Conn) SetDeadline

func (cn *Conn) SetDeadline(t time.Time) error

func (*Conn) SetReadDeadline

func (cn *Conn) SetReadDeadline(t time.Time) error

func (*Conn) SetWriteDeadline

func (cn *Conn) SetWriteDeadline(t time.Time) error

func (*Conn) Write

func (cn *Conn) Write(b []byte) (n int, err error)

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.