thinkjs2-demos icon indicating copy to clipboard operation
thinkjs2-demos copied to clipboard

例子中的配置文件的含义

Open llqgit opened this issue 9 years ago • 1 comments

export default {
  on: true, //是否开启 WebSocket
  type: "socket.io",
  allow_origin: "",
  sub_protocal: "",
  adapter: undefined,
  path: "", //url path for websocket
  messages: {
    open: 'home/index/open',
    close: 'home/index/close',
    chat: 'home/index/chat',
    typing: 'home/index/typing',
    stoptyping: 'home/index/stoptyping',
    adduser: 'home/index/adduser'
  }
};

请问,这个里边的 path 是什么意思path: "", //url path for websocket

  allow_origin: "",
  sub_protocal: "",
  adapter: undefined,

虽然这三个还没用到,但是也不知道什么意思,官网的doc说的也不充分。

我想在 websocket 的 url 上加一个路径,然后能够这样连接 socket.io

io('http://127.0.0.1:8080/test');

llqgit avatar Jul 21 '16 10:07 llqgit

遇到了同样的问题,加了官方群,发现都是一群吹逼的人,哎……

Thinkingpey avatar Mar 09 '17 09:03 Thinkingpey