<strong id="ctjbx"></strong>

  1. <strong id="ctjbx"></strong>
    <ruby id="ctjbx"></ruby>
  2. 網(wǎng)頁(yè)忽然504是什么原因造成的?網(wǎng)頁(yè)提醒websocket連接錯誤? 新要聞

    來(lái)源:cms科技時(shí)間:2023-07-04 15:18:44

    網(wǎng)頁(yè)忽然504是什么原因造成的?

    1、網(wǎng)絡(luò )504一般是因為服務(wù)器關(guān)閉或出錯導致。

    2、當然也有可能是我們的光貓前端出現了問(wèn)題。

    3、解決方法也很簡(jiǎn)單,只需要聯(lián)系相關(guān)服務(wù)人員即可。

    4、如果只有某個(gè)網(wǎng)站504,那么聯(lián)系這個(gè)網(wǎng)站的管理員讓他解決。(一般大網(wǎng)站可以去他們的微博、論壇等尋找聯(lián)系方式)

    5、如果所有網(wǎng)站都這樣,那么撥打你的網(wǎng)絡(luò )運營(yíng)商電話(huà),讓他們解決就行了。

    網(wǎng)頁(yè)提醒websocket連接錯誤?

    這是我的服務(wù)器端代碼。

    var http = require('http');

    var express = require('express');

    var ExpresspeerServer = require('peer').ExpresspeerServer;

    var app = express();

    var server = http.createServer(app);

    var options = {

    debug: true,key: 'peerjs',allow_discovery: true,ssl: {

    key: '',cert: ''

    },proxied: true

    };

    var expresspeerServer = ExpresspeerServer(server,options);

    app.use('/api',expresspeerServer);

    app.use('/',express.static('.'));

    app.use('/list',function (req,res) {

    var port = process.env.PORT || 8080;

    server.listen(port,function () {

    console.log('Basic-ss live at',port);

    expresspeerServer.on('connection',function (id) {

    console.log('Peer connected with id:',id);

    expresspeerServer.on('disconnect',function (id) {

    console.log('Peer %s disconnected',id);

    以下是連接對等方的客戶(hù)端代碼。

    initPeer(peerId) {

    this.peer = new Peer(peerId,{

    host: 'localhost',port: 8080,path: '/api',debug: 3,config: {

    'iceServers': [

    { url: 'stun:stun.l.google.com:19302' },]

    setTimeout(() => {

    this.currentPeerId = this.peer.id;

    if (this.currentPeerId !== null) {

    isPeerConnected = true;

    } else {

    isPeerConnected = false;

    console.log('Current Peer ID',this.currentPeerId);

    },4000);

    此代碼在localhost中可以正常運行。 這是我在服務(wù)器中上傳的代碼。

    this.peer = new Peer(peerId,{

    host: '',===> my domain name here.

    port: 8080,key: 'mebstelemedclinic',{

    url: 'turn:192.158.29.39:3478?transport=udp',credential: 'JZEOEt2V3Qb0y27GRntt2u2PAYA=',username: '28224511:1379330808'

    如果使用相同的服務(wù)器代碼和上面的客戶(hù)端代碼,則會(huì )出現連接錯誤。

    WebSocket connection to 'wss://mydomain.in:8080/api/peerjs?key=peerjs&id=LY42201PH-yKy04f-ygqZJhqrBmezG6&token=n42tatqqn9e' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT

    標簽: 網(wǎng)頁(yè)出現504是什么原因造成的 網(wǎng)頁(yè)忽

    責任編輯:FD31
    上一篇:全球觀(guān)點(diǎn):平輿縣清河街道:多措并舉密織防溺安全網(wǎng)
    下一篇:最后一頁(yè)

    久爱免费观看在线精品_亚洲综合一区二区三区_最新国产国模无码视频在线_中文字幕无码精品亚洲资源网久久

      <strong id="ctjbx"></strong>

    1. <strong id="ctjbx"></strong>
      <ruby id="ctjbx"></ruby>