'ODTONE - Open Dot Twenty One'

PrevUpHomeNext

Dummyserver

Getting Started

The dummyserver is a simple application that, as the name implies, works like a dummy server. It is always listening (at port 4000) for incoming messages and print them in the console.

This pretends to simulate either a MIHF or a MIH SAP.

It is possible to modify the behaviour of the dummyserver when it receives a new message. To do it, the "static void process_message(meta_message_ptr& msg)" function must be modified according to the desired behavior.

E.g.: Let's change the dummyserver behavior in order to send the received message to a specific destination (assuming that the mechanisms for sending messages have already been defined):

static void process_message(meta_message_ptr& msg)
{
	std::cout << "MIH message: Service=" << msg->sid()
		  << " Opcode=" << msg->opcode()
		  << " Action=" << msg->aid()
		  << std::endl;

	sap.send(msg);
}

Just run dummyserver and wait for incoming messages!


PrevUpHomeNext