The most advanced Websocket tool for MacOs made by AwayUp Agency. This tool was built to be easy to use when you need it, and easy to hide when you don't. WebSocket Client saves your configuration and saves all the connections you create. And of course, you also keep the configuration as for example all the readers entered. A WebSocket request could come in on any URL, but this sample code only accepts requests for /ws. When using a WebSocket, you must keep the middleware pipeline running for the duration of the connection. If you attempt to send or receive a WebSocket message after the middleware pipeline ends, you may get an exception like the following.

  • HTML5 Tutorial
  • HTML5 Demo
  • HTML5 Tools
  • HTML5 Useful References
  • HTML5 Tag Reference
  • HTML5 Resources
  • Selected Reading
Macos

WebSockets is a next-generation bidirectional communication technology for web applications which operates over a single socket and is exposed via a JavaScript interface in HTML 5 compliant browsers.

Once you get a Web Socket connection with the web server, you can send data from browser to server by calling a send() method, and receive data from server to browser by an onmessage event handler.

Following is the API which creates a new WebSocket object.

Here first argument, url, specifies the URL to which to connect. The second attribute, protocol is optional, and if present, specifies a sub-protocol that the server must support for the connection to be successful.

Macos

WebSocket Attributes

Following are the attribute of WebSocket object. Assuming we created Socket object as mentioned above −

Websocket Client For Macos Windows 10

Sr.No.Attribute & Description
1

Socket.readyState

The readonly attribute readyState represents the state of the connection. It can have the following values −

  • A value of 0 indicates that the connection has not yet been established.

  • A value of 1 indicates that the connection is established and communication is possible.

  • A value of 2 indicates that the connection is going through the closing handshake.

  • A value of 3 indicates that the connection has been closed or could not be opened.

2

Socket.bufferedAmount

The readonly attribute bufferedAmount represents the number of bytes of UTF-8 text that have been queued using send() method.

WebSocket Events

Following are the events associated with WebSocket object. Assuming we created Socket object as mentioned above −

EventEvent HandlerDescription
openSocket.onopenThis event occurs when socket connection is established.
messageSocket.onmessageThis event occurs when client receives data from server.
errorSocket.onerrorThis event occurs when there is any error in communication.
closeSocket.oncloseThis event occurs when connection is closed.

WebSocket Methods

Following are the methods associated with WebSocket object. Assuming we created Socket object as mentioned above −

Sr.No.Method & Description
1

Socket.send()

The send(data) method transmits data using the connection.

2

Socket.close()

The close() method would be used to terminate any existing connection.

WebSocket Example

A WebSocket is a standard bidirectional TCP socket between the client and the server. The socket starts out as a HTTP connection and then 'Upgrades' to a TCP socket after a HTTP handshake. After the handshake, either side can send data.

Client Side HTML & JavaScript Code

At the time of writing this tutorial, there are only few web browsers supporting WebSocket() interface. You can try following example with latest version of Chrome, Mozilla, Opera and Safari.

Install pywebsocket

Before you test above client program, you need a server which supports WebSocket. Download mod_pywebsocket-x.x.x.tar.gz from pywebsocket which aims to provide a Web Socket extension for Apache HTTP Server and install it following these steps.

  • Unzip and untar the downloaded file.

  • Go inside pywebsocket-x.x.x/src/ directory.

  • $python setup.py build

  • $sudo python setup.py install

  • Then read document by −

    • $pydoc mod_pywebsocket

This will install it into your python environment.

Start the Server

Go to the pywebsocket-x.x.x/src/mod_pywebsocket folder and run the following command −

This will start the server listening at port 9998 and use the handlers directory specified by the -w option where our echo_wsh.py resides.

Now using Chrome browser open the html file your created in the beginning. If your browser supports WebSocket(), then you would get alert indicating that your browser supports WebSocket and finally when you click on 'Run WebSocket' you would get Goodbye message sent by the server script.

Websocket Client For Macos Download

Only use this release with OBS Studio 25 or above!
Changes since 4.7.0
New Features

  • Added Events:
  • Added Requests:
Enhancements
  • In GetSceneItemProperties, SetSceneItemProperties and ResetSceneItem, you can now target scene items either by their source name or by their ID (#449)
  • Added itemId response property to the GetSceneItemProperties request
  • Added alignment response property to the GetSceneItemProperties request
  • Added type response property to the TransitionBegin event
  • Added muted property to SceneItem typedef
  • Added supported-image-export-formats response property to the GetVersion request
  • Added useDecibel request property to SetVolume and GetVolume requests. See docs for more info
  • Added compressionQuality and fileFormat request properties to TakeSourceScreenshot
  • Added sourceType response property to SourceRenamed event
  • SendCaptions now uses obs_output_output_caption_text2 internally
  • The macOS binary and installer now have proper digital signatures and are notarized by Apple
Fixes
  • Fixed crashes when calling EnableStudioMode, DisableStudioMode or ToggleStudioMode
  • Fixed an issue where SetStreamSettings wouldn't apply if switching service type
  • Any event that returns transition duration now returns -1 if the transition is fixed (Eg. Cut, Stinger)
  • SetSyncOffset now allows negative offsets
  • Removed from-scene from TransitionEnd since it isnt actually available
  • Fixed JPEG support in TakeSourceScreenshot on Windows
  • Fixed a crash when sending an event on OBS exit
  • Fixed source recognition on GDI+ and Freetype 2 sources
  • Fixed the OBS log getting spammed with unnecessary messages on Linux (regardless of whether debug logging was enabled)
  • Fixed an issue where the plugin failed to load on MacOS
  • Fixed a bunch of memory leaks in GetCurrentProfile, GetCurrentSceneCollection and the Heartbeat event
Important Notes

Websocket Client For Macos 7

  • SetBrowserSourceProperties and GetBrowserSourceProperties are now deprecated in favor of SetSourceSettings and GetSourceSettings
  • The build instructions for linux have changed. See the build doc for more info
  • Unfortunately, T-Bar control did not make it into this release, as the libobs API doesn't yet provide all the necessary functions to achieve this functionality
Windows, Linux and macOS Install instructions:

Websocket Client For Macos Mac

see the release page on GitHub.