Provides a simple Bluetooth messaging interface and implements TCP/IP based communications for testing the applications in the emulator.
I'm using this code in IntensiBlast for multi-player gaming. We are running the game on three phones (nearly :-) without problems.
Create a client and a server instance like this:
On the client side: iTransport = CMultiPlayerClient::NewL(); iProtocol = CYourProtocol::NewL( *iTransport, *this /* is-a MEventReceiver */ ); On the server side: iTransport = CMultiPlayerServer::NewL( iNumberOfExpectedClients ); iProtocol = CYourProtocol::NewL( *iTransport, *this /* is-a MEventReceiver */ );
Implement the packet-based communication inside CYourProtocol. Look at the interfaces of CMultiPlayerClient and CMultiPlayerServer.
The code will then work on the phones (via Bluetooth) and in the emulator (via TCP/IP).