Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/socket.js

  • Provides:

    • dojox.socket
  • Requires:

    • dojo.cookie in common
  • window.WebSocket

    • alias - window.WebSocket
  • dojox.socket

    • alias - Socket
  • Socket.WebSocket

    • parameters:
      • args
      • fallback
    • summary
      A wrapper for WebSocket, than handles standard args and relative URLs
    • type
      Function
  • Socket.replace

    • parameters:
      • socket
      • newSocket
      • listenForOpen
    • type
      Function
  • Socket.LongPoll

    • parameters:
      • args: (typeof dojo.__XhrArgs)
        This uses the same arguments as the other I/O functions in Dojo, with this addition:
        args.interval:
        Indicates the amount of time (in milliseconds) after a response was received
        before another request is made. By default, a request is made immediately
        after getting a response. The interval can be increased to reduce load on the
        server or to do simple time-based polling where the server always responds
        immediately.
        args.transport:
        Provide an alternate transport like dojo.io.script.get
    • summary
      Provides a simple long-poll based comet-style socket/connection to a server and returns an
      object implementing the WebSocket interface:
      http://dev.w3.org/html5/websockets/#websocket
    • return_summary
      An object that implements the WebSocket API
    • example
       dojo.require("dojox.socket.LongPoll");
       var socket = dojox.socket.LongPoll({url:"/comet"});
      or:
       dojo.require("dojox.socket.LongPoll");
       dojox.socket.LongPoll.add();
       var socket = dojox.socket({url:"/comet"});
    • type
      Function
  • dojox

    • type
      Object