Go 1.11 telah mencapai akhir dukungan
dan akan dihentikan penggunaannya
pada 31 Januari 2026. Setelah penghentian penggunaan, Anda tidak akan dapat men-deploy aplikasi Go 1.11, meskipun organisasi Anda sebelumnya menggunakan kebijakan organisasi untuk mengaktifkan kembali deployment runtime lama. Aplikasi Go 1.11 yang ada akan terus berjalan dan menerima traffic setelah tanggal penghentiannya. Sebaiknya Anda bermigrasi ke Go versi terbaru yang didukung.
Library yang dapat menerima net.Conn seharusnya berfungsi tanpa modifikasi.
Pembatasan dan batasan
Dukungan socket di App Engine memiliki batasan berikut:
Anda tidak dapat membuat soket pemrosesan; Anda hanya dapat membuat soket keluar.
FTP tidak didukung.
Anda hanya dapat menggunakan TCP atau UDP; protokol arbitrer tidak diperbolehkan.
Anda tidak dapat terikat pada alamat IP atau port tertentu.
Port 25 (SMTP) diblokir; Anda masih dapat menggunakan SMTP yang diautentikasi pada
port pengiriman 587.
Rentang IP pribadi, siaran, multicast, dan Google diblokir, kecuali yang tercantum di bawah:
Google Public DNS: 8.8.8.8, 8.8.4.4, 2001:4860:4860::8888,
2001:4860:4860::8844 port 53
SMTP Gmail: smtp.gmail.com port 465 dan 587
POP3S Gmail: pop.gmail.com port 995
IMAPS Gmail: imap.gmail.com port 993
Deskripsi soket dikaitkan dengan aplikasi App Engine yang
membuatnya dan tidak dapat ditransfer (tidak dapat digunakan oleh aplikasi lain).
Soket dapat digunakan kembali setelah 10 menit dalam kondisi tidak aktif; operasi soket apa pun akan
menjaga soket tersebut tetap aktif selama 10 menit lagi.
Menggunakan soket dengan server pengembangan
Anda dapat menjalankan dan menguji kode menggunakan soket di server pengembangan, tanpa menggunakan
parameter command line khusus.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[[["\u003cp\u003eThis socket API is outdated and only compatible with the Go 1.11 runtime, requiring migration to a recommended solution before upgrading to Go 1.12 or later.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine supports outbound socket connections through the \u003ccode\u003eappengine/socket\u003c/code\u003e package, with traffic billed as outgoing bandwidth.\u003c/p\u003e\n"],["\u003cp\u003eSocket functionality in App Engine is limited to outbound connections, prohibiting the creation of listening sockets and supporting only TCP or UDP protocols.\u003c/p\u003e\n"],["\u003cp\u003eCertain ports and IP ranges are restricted, including port 25 (SMTP) and private, broadcast, or multicast IP ranges, with exceptions for specific Google services like DNS and Gmail.\u003c/p\u003e\n"],["\u003cp\u003eSockets are tied to the App Engine app that creates them and can be automatically reclaimed after 10 minutes of inactivity.\u003c/p\u003e\n"]]],[],null,["# Sockets API for legacy bundled services\n\n| **Caution:** **This solution is no longer recommended:** Apps that use this API can only run in the Go 1.11 runtime and will need to upgrade to a [recommended solution](/appengine/migration-center/standard/services/migrating-services) before migrating to the Go 1.12+ runtime.\n\nTraffic from sockets is billed as [outgoing bandwidth](/appengine/docs/pricing#Billable_Resource_Unit_Costs). App Engine supports outbound sockets through the [`appengine/socket` package](/appengine/docs/legacy/standard/go111/reference/latest/socket).\n\n\u003cbr /\u003e\n\nLibraries that can accept a `net.Conn` should work without modification.\n\n\nLimitations and restrictions\n----------------------------\n\nSocket support in App Engine has the following limitations:\n\n- You cannot create a listen socket; you can only create outbound sockets.\n- FTP is not supported.\n- You can only use TCP or UDP; arbitrary protocols are not allowed.\n- You cannot bind to specific IP addresses or ports.\n- Port 25 (SMTP) is blocked; you can still use authenticated SMTP on the submission port 587.\n- Private, broadcast, multicast, and Google IP ranges are blocked, except\n those listed below:\n\n - Google Public DNS: `8.8.8.8`, `8.8.4.4`, `2001:4860:4860::8888`, `2001:4860:4860::8844` port 53\n - Gmail SMTPS: `smtp.gmail.com` port 465 and 587\n - Gmail POP3S: `pop.gmail.com` port 995\n - Gmail IMAPS: `imap.gmail.com` port 993\n\n | **Note:** Google Compute Engine IP addresses are not considered to be in Google IP ranges. You can use sockets to connect App Engine apps to Compute Engine instances.\n- Socket descriptors are associated with the App Engine app that\n created them and are non-transferable (cannot be used by other apps).\n\n- Sockets may be reclaimed after 10 minutes of inactivity; any socket operation\n keeps the socket alive for a further 10 minutes.\n\n\n Using sockets with the development server\n -----------------------------------------\n\n You can run and test code using sockets on the development server, without using\n any special command line parameters."]]