LoginSignup
0
0

More than 5 years have passed since last update.

FirefoxOSアプリでTCP Socket通信をするための準備(ただしPrivilegedアプリのみ)

Last updated at Posted at 2015-11-04

FirefoxOSで一番かわいい(しかも世界で唯一ISO-2022対応の)IRCクライアント「FoxkehChat IRC」というのを作っているのだが、まあIRCという古の古物はTCPしゃべれないと何も出来ないんですよ。よって以下の様な準備をする。

manifest.webappファイルに"permissions"->"tcp-socket"と書くだけ。descriptionは、適当でOK、ただしマーケットプレイス審査時に見られるので、妥当な内容のほうが良い。

なお、TCP通信が行えるのは"type": "privileged"なアプリケーションだけなので、ウェブアプリ型の場合は、milkcocoaやnode.jsなどのバックエンドを使って頑張る必要がある。

manifest.webapp
"type": "privileged",
"permissions": {
    "tcp-socket": {
        "description": "connect to IRC servers."
    }
},

また、MDN: TCP Socket APIも参照されたい。ちなみに使われるのは、かなり嫌っぽそうな雰囲気。レッツ・トライ。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0