Driving the SiGML Player App

From Virtual Humans
Revision as of 18:24, 20 June 2013 by John.Glauert (talk | contribs) (Added documentation on SignStreamer)
Jump to navigation Jump to search

Home > JASigning


This page describes the protocol a client app needs to follow in order to drive the SiGML (Service) Player app and provides a simple Java application that uses the protocol.

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.

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.


Home > JASigning