upstream version 1.2.2
[debian/freetts] / demo / freetts / ClientServer / Protocol.txt
1 # Copyright 2001 Sun Microsystems, Inc.
2 # All Rights Reserved.  Use is subject to license terms.
3
4 # See the file "license.terms" for information on usage and
5 # redistribution of this file, and for a DISCLAIMER OF ALL 
6 # WARRANTIES.
7 #
8
9 The protocol between client and server for the Client/Server demo is
10 as follows:
11
12 Client                              Server
13 ------                              ------
14 1.                                  Waiting for connection.
15 2. Opens socket connection
16    to Server.
17 3.                                  Accepts connection request.
18
19 4.                           <---   Send "READY\n" string.
20 5. Send "TTS\n" string.      --->
21 6. Send "<sample rate>\n".   --->
22 7. Send "<text>\n".          --->
23 8.                                  Perform TTS.
24 9.                           <---   Send "<number of bytes in sample>\n".
25 10.                          <---   Send sample bytes.
26 11.                          <---   Send "-1\n" for "no more data".
27                                     Or send "-2\n" for error.
28 12. For more TTS, do back to
29     step 5.
30 13. Send "DONE\n" string.    --->
31 14. Closes the socket connection.
32
33
34