tags:

views:

298

answers:

1

In transient server implementation, client application is console based exe

i want to know if i integrate my GUI based appplication with client and server given in transient server

what is best way

1)whether it is good to convert client exe to dll and use the dll in my application using RLibrary

2)whether it is good to implement LIB and integrate into project

rightnow i am able to launch TestClient.exe from my GUI application using startup api

if i want to run server in backround and my GUI application in foreground

what is best way to integrate transient server with GUI application,

Launcing TextClient.exe will not solve my problem b'coz i want to communicate my GUI communicate with client

Thanks in advance

bye

A: 

If your intention is to separate the GUI from a daemon-like background process, you might want to check out the concept of client/server architecture on symbian - not to be confused with client/server networking situations.

Symbian Client/Server architecture allows two-way communication between the GUI in your example and the background process.

Forum Nokia - Introduction to the client-server architecture

Dominik
hi,i have implemented client server architecturebut my problem is that,tcp ip socket taking time to read data from socket and i am getting response from client in service methodin that service method i have to write responce to client which how to implement tcp socket in symbian
rahulm
Communication from client to server in Symbian architecture is asynchronous. The client watches the TRequestStatus that is associated with the message it has sent to the server. When the server completes the RMessage, ActiveScheduler calls the RunL method on the client side. So, you can do your TCP communication on the server side first, parse the incoming data, and then only after the data was received you can complete the RMessage.
Dominik
thanks for replycode i am having for client -server implementation is taken from file server example which dont have active object RunL() and asychronous call it only having connect() and start server() methodduring write operation if i provide TRequeststatus parameter it crashes with user panic 70(stray signal)can u provide me link of any example which have implemented proper client and any sample code
rahulm
With some googling, on http://discussion.forum.nokia.com/forum/showthread.php?t=125929 I found, there is on in the SDK: \Symbian\9.1\S60_3rd\Examples\Base\IPC\ClientServer\ and one online http://www.meme-education.com/ASDBookSOSEcode.html
Dominik
thanks for replyi am able to implement asychronous cleint server architecturemy problem is that ,there is tcp socket which i integrate in server which is derive from (CServer2)class CTimeServer : public CServer2 which is also active object to get value to chat socket if i call CTimeServer* iTimeServer = CTimeServer::NewL(); iTimeServer->SendTimeToSessions(data);delete iTimeServer;it crahses with user panic 47 b'coz in constructL() of CTimeServerhow to resolve conflict of two active
rahulm
You can only watch one TRequestStatus per ActiveObject. If you need to watch multiple TRequestStatus' in sequence, you need to have separate AO's for that and something like a state machine implementation controlling them, otherwise you easily get stray signal panics.
Dominik