소켓

sockets 매니페스트 속성은 sockets.udp, sockets.tcp, sockets.tcpServer API에 사용할 수 있는 권한을 선언합니다.

샘플 manifest.json

{
  "name": "My Sockets app",
  "sockets": {
    "udp": {
      // Permission for chrome.sockets.udp.send:
      // The application is allowed to send udp packets
      // to any host:port combination.
      "send": "*"
    },
    "tcp": {
      // Permission for chrome.sockets.tcp.connect:
      // The application is allowed to connect only to the
      // tcp server on 127.0.0.1 port 80.
      "connect": "127.0.0.1:80"
    },
    "tcpServer": {
      // Permission for chrome.sockets.tcpServer.listen:
      // The application is allowed to accept new client
      // connections on the local address at port 80.
      "listen": "127.0.0.1:80"
    }
  },
  ...
}

참조

  • udp (객체) - 선택사항

    udp 매니페스트 속성은 앱이 실행할 수 있는 sockets.udp 작업을 선언합니다.

    유형속성설명
    문자열 또는 문자열 배열(선택사항) 바인드

    bind 작업의 host:port 패턴입니다.

    문자열 또는 문자열 배열(선택사항) 보내기

    send 작업의 host:port 패턴입니다.

    문자열 또는 문자열 배열(선택사항) multicastMembership

    joinGroup 작업의 host:port 패턴입니다.

  • tcp (객체) - 선택사항

    tcp 매니페스트 속성은 앱이 실행할 수 있는 sockets.tcp 작업을 선언합니다.

    유형속성설명
    문자열 또는 문자열 배열(선택사항) 연결

    connect 작업의 host:port 패턴입니다.

  • tcpServer (객체) - 선택사항

    tcpServer 매니페스트 속성은 앱이 실행할 수 있는 sockets.tcpServer 작업을 선언합니다.

    유형속성설명
    문자열 또는 문자열 배열(선택사항) 듣기

    listen 작업의 host:port 패턴입니다.