<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://jitterjames.net/voxcommandoWiki/index.php?action=history&amp;feed=atom&amp;title=Plugin_TCP</id>
	<title>Plugin TCP - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://jitterjames.net/voxcommandoWiki/index.php?action=history&amp;feed=atom&amp;title=Plugin_TCP"/>
	<link rel="alternate" type="text/html" href="https://jitterjames.net/voxcommandoWiki/index.php?title=Plugin_TCP&amp;action=history"/>
	<updated>2026-10-16T08:10:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://jitterjames.net/voxcommandoWiki/index.php?title=Plugin_TCP&amp;diff=209&amp;oldid=prev</id>
		<title>James: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://jitterjames.net/voxcommandoWiki/index.php?title=Plugin_TCP&amp;diff=209&amp;oldid=prev"/>
		<updated>2021-01-13T17:25:01Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:25, 13 January 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>James</name></author>
		
	</entry>
	<entry>
		<id>https://jitterjames.net/voxcommandoWiki/index.php?title=Plugin_TCP&amp;diff=208&amp;oldid=prev</id>
		<title>Jitterjames: /* Plugin Description */</title>
		<link rel="alternate" type="text/html" href="https://jitterjames.net/voxcommandoWiki/index.php?title=Plugin_TCP&amp;diff=208&amp;oldid=prev"/>
		<updated>2018-12-05T20:51:02Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Plugin Description&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Go to the main '''[[Plugins]]''' page.&lt;br /&gt;
&lt;br /&gt;
Go to the complete '''[[Plugin List]]'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Plugin Description=&lt;br /&gt;
&lt;br /&gt;
A multipurpose networking plugin that allows the following and more:&lt;br /&gt;
&lt;br /&gt;
* Send and receive messages on TCP sockets.&lt;br /&gt;
* Host simple web pages and accept [[API]] commands&lt;br /&gt;
* Allow [[Google Speech]] in Chrome to be used for speech recognition&lt;br /&gt;
&lt;br /&gt;
=Actions for the TCP plugin=&lt;br /&gt;
==Client==&lt;br /&gt;
Create a named client, and connect to a server. &amp;lt;BR/&amp;gt;Write to the server.&amp;lt;BR/&amp;gt;Receive messages back from the server as events.&lt;br /&gt;
===Connect===&lt;br /&gt;
[[TCP.Client.Connect]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
Connects to a server and keeps the connection open, after which messages from the server will generate events. &amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;Events will use the client name unless the &amp;lt;EventName&amp;gt; parameter is specified. The message from the server will be attached to the event as a payload. If the server uses a standard terminator at the end of every message (e.g., \x0d) this can be specified in the &amp;lt;Terminator&amp;gt; parameter to ensure that each message generates exactly one event.&amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Parameters: 3-6&lt;br /&gt;
#Name : Name of client to create [''string'']&lt;br /&gt;
#Ip : Address of server to connect to [''string'']&lt;br /&gt;
#Port : Port of server to connect to [''integer'']&lt;br /&gt;
#Terminator : Server terminates messages with this byte [''string'']&lt;br /&gt;
#EventName : Generate events with this name when message received from server [''string'']&lt;br /&gt;
#EventFilter : Only generate events if they match this Regular Expression [''string'']&lt;br /&gt;
===Disconnect===&lt;br /&gt;
[[TCP.Client.Disconnect]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
Client will disconnect and be destroyed.&amp;lt;BR/&amp;gt;You can reconnect using the name afterwards.&amp;lt;BR/&amp;gt;If you only want to send a single command and then disconnect. consider using TCP.Single.Write instead.&lt;br /&gt;
&lt;br /&gt;
* Parameters: 1&lt;br /&gt;
#Name : Name of client to disconnect from [''string'']&lt;br /&gt;
===Query===&lt;br /&gt;
[[TCP.Client.Query]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
Query server, similar to TCP.Client.Write. Response will be stored in {LastResult}.&amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;ClientName must be the name of a client that was previously created using TCP.Client.Connect&amp;lt;BR/&amp;gt;To include bytes in the &amp;lt;message&amp;gt;, you can encode bytes as follows&amp;lt;BR/&amp;gt;0:       \x00&amp;lt;BR/&amp;gt;1:       \x01&amp;lt;BR/&amp;gt;255:   \xFF&amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;Note: You must first use the Client.Connect action.&lt;br /&gt;
&lt;br /&gt;
* Parameters: 3-4&lt;br /&gt;
#ClientName : Name of client to use [''string'']&lt;br /&gt;
#Message : Message to send [''string'']&lt;br /&gt;
#Delay : Milliseconds to wait for a response of the server [''integer'']&lt;br /&gt;
#Notes :  [''string'']&lt;br /&gt;
===Write===&lt;br /&gt;
[[TCP.Client.Write]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
ClientName must be the name of a client that was previously created using TCP.Client.Connect.&amp;lt;BR/&amp;gt;To include bytes in the &amp;lt;message&amp;gt;, you can encode bytes as follows&amp;lt;BR/&amp;gt;0:       \x00&amp;lt;BR/&amp;gt;1:       \x01&amp;lt;BR/&amp;gt;255:   \xFF&amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;Note: You must first use the Client.Connect action.&lt;br /&gt;
&lt;br /&gt;
* Parameters: 2-4&lt;br /&gt;
#ClientName : Name of client to use [''string'']&lt;br /&gt;
#Message : Message to send [''string'']&lt;br /&gt;
#Delay : Milliseconds to wait after sending the message (default is 10) [''integer'']&lt;br /&gt;
#Notes :  [''string'']&lt;br /&gt;
===WriteLn===&lt;br /&gt;
[[TCP.Client.WriteLn]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
ClientName must be the name of a client that was previously created using TCP.Client.Connect.&amp;lt;BR/&amp;gt;To include bytes in the &amp;lt;message&amp;gt;, you can encode bytes as follows&amp;lt;BR/&amp;gt;0:       \x00&amp;lt;BR/&amp;gt;1:       \x01&amp;lt;BR/&amp;gt;255:   \xFF&amp;lt;BR/&amp;gt;Message will automatically have a carriage return added to it ( \x0D ).&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Parameters: 2-4&lt;br /&gt;
#ClientName :  [''string'']&lt;br /&gt;
#Message :  [''string'']&lt;br /&gt;
#Delay : Milliseconds to wait after sending the message (default is 10) [''integer'']&lt;br /&gt;
#Notes : You can write anything here. VC will not use it. [''string'']&lt;br /&gt;
==GS==&lt;br /&gt;
Actions for using Google speech recognition in a Chrome Browser with VoxCommando.&amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;Both the &amp;quot;Web Server&amp;quot; AND &amp;quot;Google Speech&amp;quot; must be enalbed in the TCP plugin settings to use Google speech recognition in Chrome with VoxCommando.&lt;br /&gt;
===Close===&lt;br /&gt;
[[TCP.GS.Close]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
( BETA )&amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;Attempts to find and close the first Chrome tab that appears to be hosting the speech web page.  May not work if there are multiple Chrome windows open.&amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;It is probably better to leave the Google speech web page open and turn the microphone on and off using TCP.GS.On and TCP.GS.Off&lt;br /&gt;
===Launch===&lt;br /&gt;
[[TCP.GS.Launch]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
Attempts to launch the Google Speech web page in Chrome.&amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;Both the &amp;quot;Web Server&amp;quot; AND &amp;quot;Google Speech&amp;quot; must be enalbed in the TCP plugin settings to use Google speech recognition in Chrome with VoxCommando.&lt;br /&gt;
===On===&lt;br /&gt;
[[TCP.GS.On]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
Sends a message to the web page to attempt to turn the microphone on and start listening for speech.&lt;br /&gt;
===Off===&lt;br /&gt;
[[TCP.GS.Off]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
Sends a message to the web page to attempt to turn the microphone off and stop listening for speech.&lt;br /&gt;
===Send===&lt;br /&gt;
[[TCP.GS.Send]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
Send any message to the web page via websocket.&amp;lt;BR/&amp;gt;(May be useful in later versions of the plugin.)&lt;br /&gt;
&lt;br /&gt;
* Parameters: 1&lt;br /&gt;
#Message : Text to send to web page [''string'']&lt;br /&gt;
===SetLanguage===&lt;br /&gt;
[[TCP.GS.SetLanguage]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
Sets the speech recognition language.&amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;Language codes can be found in the TCP settings under the Google Speech tab or possibly there are more codes listed here: https://cloud.google.com/speech-to-text/docs/languages&lt;br /&gt;
&lt;br /&gt;
* Parameters: 1&lt;br /&gt;
#LanguageCode : Example: en-US, fr-FR, de-DE, af-ZA [''string'']&lt;br /&gt;
===SetPrefix===&lt;br /&gt;
[[TCP.GS.SetPrefix]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
If a prefix is used, the webpage will only send recognized text to VoxCommando when the prefix is detected.  &amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;Any text recognized AFTER the prefix will be sent to VoxCommando for processing.&amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;If &amp;lt;Prefix&amp;gt; is blank or omitted the prefix will be removed and ALL text will be accepted.&lt;br /&gt;
&lt;br /&gt;
* Parameters: 1&lt;br /&gt;
#Prefix : Prefix used to indicate that speech should be sent to VoxCommando [''string'']&lt;br /&gt;
==Server==&lt;br /&gt;
Create TCP servers that can listen for connections, and receive messages.&amp;lt;BR/&amp;gt;Messages can trigger VC actions or be used to create events.&lt;br /&gt;
===Start===&lt;br /&gt;
[[TCP.Server.Start]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
If &amp;lt;GenEvent&amp;gt; parameter is omitted or blank, all incoming client messages will be treated as commands intended for VC.  Example: incoming message &amp;quot;VC.On&amp;quot; will turn VC green.&amp;lt;BR/&amp;gt;If &amp;lt;GenEvent&amp;gt; is specified, then all incoming requests will generate an event and the message from the client will be passed as a payload(s).&amp;lt;BR/&amp;gt;If &amp;lt;GenEvent&amp;gt; is used, and the message contains '&amp;amp;&amp;amp;' multiple payloads will be created.&lt;br /&gt;
&lt;br /&gt;
* Parameters: 1-2&lt;br /&gt;
#Port : TCP port to listen on [''integer'']&lt;br /&gt;
#GenEvent : Generate an event instead of sending command to VC [''string'']&lt;br /&gt;
===Stop===&lt;br /&gt;
[[TCP.Server.Stop]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
Stops the server running on &amp;lt;Port&amp;gt;.&amp;lt;BR/&amp;gt;Server must first have been created using TCP.StartServer.&lt;br /&gt;
&lt;br /&gt;
* Parameters: 1&lt;br /&gt;
#Port : Port of server to close [''integer'']&lt;br /&gt;
==Single==&lt;br /&gt;
These commands will:&amp;lt;BR/&amp;gt;-open a new connection&amp;lt;BR/&amp;gt;-send a string&amp;lt;BR/&amp;gt;-close the connection immediately&lt;br /&gt;
===Write===&lt;br /&gt;
[[TCP.Single.Write]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
Will send the string &amp;lt;Message&amp;gt; without adding a carriage-return to the IP and port specified in plugin settings.&amp;lt;BR/&amp;gt;To include bytes in the &amp;lt;message&amp;gt;, you can encode bytes as follows&amp;lt;BR/&amp;gt;0:       \x00&amp;lt;BR/&amp;gt;1:       \x01&amp;lt;BR/&amp;gt;255:   \xFF&amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;If Query is set to true then will wait for a response for the server and store it in {LastResult}.&lt;br /&gt;
&lt;br /&gt;
* Parameters: 3-4&lt;br /&gt;
#Message : TCP message to send. Encode bytes as \x00\x01...\xFF [''string'']&lt;br /&gt;
#IP :  [''string'']&lt;br /&gt;
#Port :  [''integer'']&lt;br /&gt;
#Query : Default = false.  If true will wait for a response from the server [''boolean'']&lt;br /&gt;
===WriteLn===&lt;br /&gt;
[[TCP.Single.WriteLn]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
Will send the string &amp;lt;Message&amp;gt; followed by a carriage-return (\x0D) to the IP and port specified in plugin settings.&amp;lt;BR/&amp;gt;To include bytes in the &amp;lt;Message&amp;gt;, you can encode bytes as follows:&amp;lt;BR/&amp;gt;0:       \x00&amp;lt;BR/&amp;gt;1:       \x01&amp;lt;BR/&amp;gt;255:   \xFF&amp;lt;BR/&amp;gt;&amp;lt;BR/&amp;gt;If Query is set to true then will wait for a response for the server and store it in {LastResult}.&lt;br /&gt;
&lt;br /&gt;
* Parameters: 3-4&lt;br /&gt;
#Message : TCP message to send [''string'']&lt;br /&gt;
#IP :  [''string'']&lt;br /&gt;
#Port :  [''integer'']&lt;br /&gt;
#Query : Default = false.  If true will wait for a response from the server [''boolean'']&lt;br /&gt;
==UDP==&lt;br /&gt;
&lt;br /&gt;
===SendMixed===&lt;br /&gt;
[[TCP.UDP.SendMixed]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
Allows you to send UDP messages to any IP and Port and to embed any ascii or non-ascii characters using the hex format \x00-\xFF.&lt;br /&gt;
&lt;br /&gt;
* Parameters: 2-3&lt;br /&gt;
#Message : string with hex encoded elements [''string'']&lt;br /&gt;
#Port : UDP port to send on [''integer'']&lt;br /&gt;
#Target IP : Defaults to broadcast IP: 255.255.255.255 [''string'']&lt;br /&gt;
==WebServer==&lt;br /&gt;
&lt;br /&gt;
===SetResponse===&lt;br /&gt;
[[TCP.WebServer.SetResponse]]&amp;lt;BR/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Parameters: 1&lt;br /&gt;
#Response :  [''string'']&lt;/div&gt;</summary>
		<author><name>Jitterjames</name></author>
		
	</entry>
</feed>