Test Introduction
=================

On Linux: run build.sh

On WinCE: build the two userspace applications from the source files
tst/Client/src/phStbIpc_ClientApp.c
tst/Server/src/phStbIpc_ServerApp.c


Local Loopback Test
===================

Run:
phStbIpc_ServerApp tcpip://127.0.0.1:1234 >server.log 2>&1 &
phStbIpc_ClientApp tcpip://127.0.0.1:1234 >client.log 2>&1 &

After a few seconds both programs should be finished.
(do a ps to see they don't exist anymore)

server.log contains:
--------------------------------------------------------------------------------
phStbIpc_ServerApp: start; address='tcpip://127.0.0.1:1234'

  phStbIpc_ServerCreate(duffTcpipAddress, &server)

  phStbIpc_ServerCreate(duffTipcAddress, &server)

  phStbIpc_ServerCreate(serverAddress, &server)

  phStbIpc_ServerHandShake(server, NULL, handshakeMessage, &endianness)

  (endianness == phStbIpc_Endianness_Big) || (endianness == phStbIpc_Endianness_Little)
server informed that client endianness = L

  phStbIpc_ServerHandShake(server, NULL, handshakeMessage, &endianness)

  (endianness == phStbIpc_Endianness_Big) || (endianness == phStbIpc_Endianness_Little)
server informed that client endianness = L

  phStbIpc_ServerAccept(server, &connection)

  phStbIpc_Read(connection, 5, buf, &n)

  n == 5

  strcmp(buf, "exit")

  phStbIpc_Close(connection)

  phStbIpc_ServerDestroy(server)
phStbIpc_ServerApp: finish OK
--------------------------------------------------------------------------------

client.log contains:
--------------------------------------------------------------------------------
connect(): Connection refused

  argc <= 2
phStbIpc_ClientApp: start; address='tcpip://127.0.0.1:1234'

  phStbIpc_ClientCreate(serverAddress, &connection)

  phStbIpc_ClientHandShake(serverAddress, connection, handshakeMessage, &endianness)

  (endianness == phStbIpc_Endianness_Big) || (endianness == phStbIpc_Endianness_Little)
client informed that server endianness = L

  phStbIpc_Close(connection)

  phStbIpc_ClientHandShake(serverAddress, NULL, handshakeMessage, &endianness)

  (endianness == phStbIpc_Endianness_Big) || (endianness == phStbIpc_Endianness_Little)

  phStbIpc_ClientCreate(serverAddress, &connection)

  phStbIpc_Write(connection, "exit", 5, &n)

  n == 5

  err = phStbIpc_ClientHandShake(serverAddress, NULL, handshakeMessage, &endianness)

  phStbIpc_Close(connection)
phStbIpc_ClientApp: finish OK
--------------------------------------------------------------------------------

Remote Test
===========
(The commands below assume that DSP_IP_SUBNET option has been set to 192.168.251 .

Run on main MIPS:
phStbIpc_ServerApp tcpip://192.168.251.1:1234 >server.log 2>&1 &

Run on Audio MIPS:
phStbIpc_ClientApp tcpip://192.168.251.1:1234 >client.log 2>&1 &

Similar output should result (with different addresses) as the
local loopback test.
