|
|
|
|||||
|
client ask a string to the server and the server send it to the client
hello. I use IceE and C++. I have this problem: the client can to send a string to the server (this work well), and the client can to ask a string to the server and the server must send it to the client, how can make this?
the slice is: module Configuration { interface Printer{ void setConfiguration(string s); string getConfiguration(); }; }; help me, please! thanks ![]() |
|
|||||
|
thanks
ok, thanks, but my problem is that: the server and the client must send and get string. I must build for the client the Ice object and the proxy this is my problem. I must build a client but not pure client, the client is a server too.
thanks. |
|
||||||
|
Hi,
I would recommend to check the callback demo from your Ice distribution (located in the demo/Ice/callback directory). I believe it does what you're looking for. Let us know if you still have any questions after checking out this demo. Cheers, Benoit. |
|
|||||
|
that's all, work well now.
But I have another problem, I must use the MFC, how I can to make this: ........... ...... string st; PrinterPrx printer = PrinterPrx::checkedCast(base); if (!printer) throw "Invalid proxy"; st=printer->getGeneral(); //get ther string of the server AfxMessageBox(CString(st)); //the problem is here .............. not possible converter std::string to CString st get the string of the server, I must display the string in a messaggebox how can I to make this??? this not a problem of ice, I know this, but I must to make this! thanks Sorry for my english, I not speak well in english! ![]() |
|
||||||
|
I'm sorry, but we cannot answer questions that are not specific to Ice, such as on general C++ programming or Microsoft class libraries.
I suggest to check out the CString documentation and the STL reference. Before posting a question here, you should also make a reasonable effort to find the answer in the manual and the demos that ship with Ice. I haven't tried this, but something like the following should work: Code:
::std::string ss = "Hello"; CString cs(ss.c_str()); // use cs... Michi. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| send an object client -> server | arnaud | Help Center | 3 | 02-23-2006 08:29 PM |
| how can i make server send string to client | jerry_cym | Help Center | 2 | 02-07-2006 05:46 AM |
| How server initiatively send message to client, and client can responce to it? | ouloba | Help Center | 3 | 11-26-2004 10:35 AM |
| An error occurs when c# client send chinese string to c++ server | ChaosXu | Help Center | 4 | 10-29-2004 08:12 AM |
| How to send data from server to client? | kane | Help Center | 4 | 10-26-2004 09:33 AM |