首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Pusherapp/Websocket未连接

Pusherapp/Websocket未连接
EN

Stack Overflow用户
提问于 2011-08-16 09:17:41
回答 1查看 2.9K关注 0票数 0

我在这里尝试使用pusherapp,但是chromium的控制台只告诉我"WebSocket在连接建立之前就关闭了“。我的JS在下面,有没有什么问题的想法?

<script type='text/javascript'>
   $(document).ready(function(){
   var pusher_key = "<%= Pusher.key %>";
   var pusher_channel = "thirsty-<%= Rails.env %>";
   var pusher = new Pusher(pusher_key, pusher_channel);
   pusher.bind('push_comment', function(content) {
     comment_html = '<li><p>' + content + '</p></li>'
     $(comment_html).prependTo('#comments');
   });
});  
</script>
EN

回答 1

Stack Overflow用户

发布于 2018-06-04 02:41:41

如果互联网连接太慢,或者检查推流器Credentials.

  • It,可能会发生这种情况。
  1. in pusher channel app,确保你用你的代码编写它。
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7072609

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档