From bigfug
Jump to: navigation, search

WebSocket Echo.jpg

Purpose

This patch uses a network WebSocket to send different text messages to an echo server that returns the message back, which we write to the Logger Window

How To Use

  • Press a button to send one of the messages to the echo server
  • Watch for the response in the Logger Window

Nodes Used

Lua

fugio = require "fugio"

PinText = fugio.input( "Text" )

function main()
	local	Text = PinText:get()

	if #Text > 0 then
		fugio.log( Text )
	end
end