Difference between revisions of "Driving the SiGML Player App"

From Virtual Humans
Jump to navigation Jump to search
Line 1: Line 1:
[[Main Page|Home]] > [[CWASA]]
+
[[Main Page|Home]] >> [[CWA Signing Avatars|CWASA]]
 
----
 
----
 
This page describes the protocol a client app needs to follow in order to drive the SiGML Player app and provides a simple Java application that uses the protocol. The same protpcol is used for the [[JASigning]] SiGML Service Player app.
 
This page describes the protocol a client app needs to follow in order to drive the SiGML Player app and provides a simple Java application that uses the protocol. The same protpcol is used for the [[JASigning]] SiGML Service Player app.
Line 21: Line 21:
 
If a new text is dispatched before performance of the previous one is complete, then that previous performance is immediately abandoned in favour of the new one.
 
If a new text is dispatched before performance of the previous one is complete, then that previous performance is immediately abandoned in favour of the new one.
 
So, although in principle the client could be on the opposite side of the world from the server, in practice it does not make much sense if the client, i.e. its user, does not actually have line-of-sight contact with the server.
 
So, although in principle the client could be on the opposite side of the world from the server, in practice it does not make much sense if the client, i.e. its user, does not actually have line-of-sight contact with the server.
 +
 +
== Unix Commandline Tool ==
 +
  
 
== Example Java Application ==
 
== Example Java Application ==
Line 32: Line 35:
  
 
The code can be adapted or incorporated in your own code but please acknowledge the source.
 
The code can be adapted or incorporated in your own code but please acknowledge the source.
 +
 +
Alternatively, on Unix systems, including OS X and Linux, the command <code>nc localhost 8052 < mySigns.sigml</code> will send SiGML data to the application.
 +
 
----
 
----
[[Main Page|Home]] > [[CWASA]]
+
[[Main Page|Home]] >> [[CWA Signing Avatars|CWASA]]

Revision as of 18:08, 15 January 2021

Home >> CWASA


This page describes the protocol a client app needs to follow in order to drive the SiGML Player app and provides a simple Java application that uses the protocol. The same protpcol is used for the JASigning SiGML Service Player app.

Protocol

The SiGML Player accepts connection requests on standard TCP/IP port number 8052.

Each time the client wants to dispatch a SiGML text to the player it performs the following sequence:

  • Make a new connection to that port (8052) on the server, i.e. the host system running the SiGML Player app, which may or may not be the "localhost".
  • Send the SiGML text on the resulting output stream.
    • If the SiGML text explicitly specifies an encoding in an initial XML declaration then the text should be sent as a byte stream with that encoding.
    • If there's no explicit encoding it should be sent as a UTF-8 stream.
  • Close the stream and the connection.

The protocol is extremely simple: so there's no feedback from the server to tell the client when the performance of a SiGML text is complete -- or indeed whether there are any errors in the SiGML text.

If a new text is dispatched before performance of the previous one is complete, then that previous performance is immediately abandoned in favour of the new one. So, although in principle the client could be on the opposite side of the world from the server, in practice it does not make much sense if the client, i.e. its user, does not actually have line-of-sight contact with the server.

Unix Commandline Tool

Example Java Application

A NetBeans project for a simple Java application is available as a ZIP archive for the SignStreamer Project.

  • The src folder contains Java source files
  • The dist folder contains SignStreamer.jar for the application
  • The application can be run by the command java -jar "SignStreamer.jar"
  • A SiGML file to be sent is selected by clicking the Select File button and sent using the Send File button

The code can be adapted or incorporated in your own code but please acknowledge the source.

Alternatively, on Unix systems, including OS X and Linux, the command nc localhost 8052 < mySigns.sigml will send SiGML data to the application.


Home >> CWASA