Go 1.11 has reached end of support
and will be deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Go 1.11
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Go
1.11 applications will continue to run and receive traffic after their
deprecation date. We
recommend that you migrate to the latest supported version of Go.
This package is only required in the classic App Engine environment.
Applications running only in App Engine "flexible environment" should
use the standard library's net package.
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 ctx is valid;
if the connection is to be used after ctx becomes invalid, invoke SetContext
with the new 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003ePackage \u003ccode\u003esocket\u003c/code\u003e provides outbound network socket functionality for the classic App Engine environment, while the standard library's \u003ccode\u003enet\u003c/code\u003e package should be used in the flexible environment.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLookupIP\u003c/code\u003e function returns the IP addresses associated with a given host.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eConn\u003c/code\u003e type represents a socket connection and implements the \u003ccode\u003enet.Conn\u003c/code\u003e interface.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDial\u003c/code\u003e and \u003ccode\u003eDialTimeout\u003c/code\u003e functions are used to establish network connections using specified protocols and addresses, with \u003ccode\u003eDialTimeout\u003c/code\u003e providing a timeout option.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eKeepAlive\u003c/code\u003e on \u003ccode\u003eConn\u003c/code\u003e signals the connection is still in use to prevent closure due to inactivity and \u003ccode\u003eSetContext\u003c/code\u003e allows a \u003ccode\u003eConn\u003c/code\u003e to be associated with a different context, such as a new user request.\u003c/p\u003e\n"]]],[],null,["# Package google.golang.org/appengine/socket (v1.6.7)\n\nVersion 1.6.7keyboard_arrow_down\n\n- [1.6.8 (latest)](/appengine/docs/legacy/standard/go111/reference/latest/socket)\n- [1.6.7](/appengine/docs/legacy/standard/go111/reference/1.6.7/socket) \n**Note:** To get more information about this package, such as access to older versions, view [this package on pkg.go.dev](https://pkg.go.dev/google.golang.org/appengine/socket). \n\u003cbr /\u003e\n\nPackage socket provides outbound network sockets.\n\nThis package is only required in the classic App Engine environment.\nApplications running only in App Engine \"flexible environment\" should\nuse the standard library's net package. \n\nFunctions\n---------\n\n### func LookupIP\n\n func LookupIP(ctx https://pkg.go.dev/golang.org/x/net/context.https://pkg.go.dev/golang.org/x/net/context#Context, host https://pkg.go.dev/builtin#string) (addrs []https://pkg.go.dev/net.https://pkg.go.dev/net#IP, err https://pkg.go.dev/builtin#error)\n\nLookupIP returns the given host's IP addresses. \n\nConn\n----\n\n type Conn struct {\n \thttps://pkg.go.dev/net.https://pkg.go.dev/net#Conn\n }\n\nConn represents a socket connection.\nIt implements net.Conn. \n\n### func Dial\n\n func Dial(ctx https://pkg.go.dev/golang.org/x/net/context.https://pkg.go.dev/golang.org/x/net/context#Context, protocol, addr https://pkg.go.dev/builtin#string) (*#google_golang_org_appengine_socket_Conn, https://pkg.go.dev/builtin#error)\n\nDial connects to the address addr on the network protocol.\nThe address format is host:port, where host may be a hostname or an IP address.\nKnown protocols are \"tcp\" and \"udp\".\nThe returned connection satisfies net.Conn, and is valid while ctx is valid;\nif the connection is to be used after ctx becomes invalid, invoke SetContext\nwith the new context. \n\n### func DialTimeout\n\n func DialTimeout(ctx https://pkg.go.dev/golang.org/x/net/context.https://pkg.go.dev/golang.org/x/net/context#Context, protocol, addr https://pkg.go.dev/builtin#string, timeout https://pkg.go.dev/time.https://pkg.go.dev/time#Duration) (*#google_golang_org_appengine_socket_Conn, https://pkg.go.dev/builtin#error)\n\nDialTimeout is like Dial but takes a timeout.\nThe timeout includes name resolution, if required. \n\n### func (\\*Conn) KeepAlive\n\n func (cn *#google_golang_org_appengine_socket_Conn) KeepAlive() https://pkg.go.dev/builtin#error\n\nKeepAlive signals that the connection is still in use.\nIt may be called to prevent the socket being closed due to inactivity. \n\n### func (\\*Conn) SetContext\n\n func (cn *#google_golang_org_appengine_socket_Conn) SetContext(ctx https://pkg.go.dev/golang.org/x/net/context.https://pkg.go.dev/golang.org/x/net/context#Context)\n\nSetContext sets the context that is used by this Conn.\nIt is usually used only when using a Conn that was created in a different context,\nsuch as when a connection is created during a warmup request but used while\nservicing a user request."]]