참고: PHP 5는 2024년 1월 30일 지원 종료되었습니다. 기존 PHP 5 애플리케이션을 계속 실행하고 트래픽을 받을 수 있습니다. 그러나 지원 종료 날짜 이후에는 해당 런타임을 사용하는 애플리케이션의 재배포를 App Engine에서 차단할 수 있습니다.
지원되는 최신 PHP 버전으로 마이그레이션하는 것이 좋습니다.
소켓의 트래픽 요금은 발신 대역폭으로 청구됩니다.
App Engine은 fsockopen과 같은 표준 PHP 라이브러리의 메서드를 사용하여 아웃바운드 소켓을 지원합니다.
지원되는 옵션의 경우 socket_get_option을 호출하면 모의 값이 반환되고 socket_set_option을 호출하면 자동으로 무시됩니다. 지원되지 않는 옵션에 대해서는 오류가 계속 발생합니다.
지원되는 옵션은 다음과 같습니다.
SO_KEEPALIVE
SO_DEBUG
TCP_NODELAY
SO_LINGER
SO_OOBINLINE
SO_SNDBUF
SO_RCVBUF
SO_REUSEADDR
제한 및 제약사항
App Engine의 소켓 지원에는 다음과 같은 제한사항이 있습니다.
리슨 소켓을 만들 수 없으며 아웃바운드 소켓만 만들 수 있습니다.
FTP는 지원되지 않습니다.
TCP 또는 UDP만 사용할 수 있습니다. 임의 프로토콜은 허용되지 않습니다.
특정 IP 주소 또는 포트로 바인딩할 수 없습니다.
포트 25(SMTP)가 차단됩니다. 제출 포트 587에서 인증된 SMTP를 계속 사용할 수 있습니다.
비공개, 브로드캐스트, 멀티캐스트, Google IP 범위는 아래 나열된 항목을 제외하고 차단됩니다.
Google Public DNS: 8.8.8.8, 8.8.4.4, 2001:4860:4860::8888, 2001:4860:4860::8844 포트 53
Gmail SMTPS: smtp.gmail.com 포트 465 및 587
Gmail POP3S: pop.gmail.com 포트 995
Gmail IMAPS: imap.gmail.com 포트 993
소켓 설명자는 자신을 만든 App Engine 앱에 연결되며 전송될 수 없습니다(다른 앱에서 사용 불가).
비활성 상태가 10분간 지속되는 소켓은 회수할 수 있습니다. 모든 소켓 작업에서 소켓이 10분 더 활성 상태로 유지됩니다.
개발 서버와 소켓 사용
특수 명령줄 매개변수를 사용하지 않고 개발 서버에서 소켓을 사용하여 코드를 실행 및 테스트할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-03-06(UTC)"],[[["This socket API is not recommended anymore, as apps using it are limited to the PHP 5 runtime and need to migrate to a different solution before upgrading to PHP 7/8."],["App Engine supports outbound sockets through standard PHP library methods like `fsockopen`, with limited options for `socket_get_option` and `socket_set_option`."],["Only outbound sockets are allowed; creating listen sockets is not possible, and certain protocols like FTP and arbitrary protocols are unsupported."],["Specific restrictions apply, such as the inability to bind to specific IPs or ports, the blocking of port 25, and the blocking of private, broadcast, and multicast IP ranges, except for specific Google services like Google Public DNS and Gmail."],["Sockets are non-transferable and may be automatically reclaimed after 10 minutes of inactivity, with any socket operation extending their life by another 10 minutes."]]],[]]