| Reply | « Previous Thread | Next Thread » |
|
Hello Frndz....
I m writing code for Client-Server Application using OBEX.At Client side ,it's easy to send something but at server side I've to receive the String or file in my application. But the prob is how can I got the Client URL? and How can the synchronization b/w Client and server is achieved? I have read the example that is OBEXDemo given in WTK but it is for Infrared.I m not able to understand the url created in the application. Plz help me its urgent......... |
|
Hi,
What do you mean by synchronization between client and server? Could you specify, If you mean receiving/sending synchronization then you could put both socket in listening mode. When a client send some thing after sending it will go to listening mode. -Mahbub |
| mahbub_s60 |
| View Public Profile |
| Find all posts by mahbub_s60 |
|
Thnx for ur reply....
Will u plz tell me how both sockets can be put on listening mode? |
|
Hi,
Here is some code // Server socket in send mode void CMessageServer::SendMessageL(const TDesC8& aData) { // cancel any read requests on socket Cancel(); if(EDisconnected != iState) { // send message iState=ESending; iAcceptedSocket.Write(aData, iStatus); SetActive(); } } // Server is in read mode void CMessageServer::RequestData() { iState = EWaitingForMessage; iAcceptedSocket.RecvOneOrMore(iBuffer, 0, iStatus, iLen); SetActive(); } // Client is in Send mode void CMessageClient::SendMessageL(const TDesC8& aData) { // Stop reading socket Cancel(); iState = ESendingMessage; iSendingSocket.Write(aData, iStatus); SetActive(); } //Client is in read mode void CMessageClient::WaitOnConnectionL() { iSendingSocket.RecvOneOrMore(iBuffer, 0, iStatus, iLen); SetActive(); } Main point is that when you need to send something, you send it and afer that you go to listening mode -Mahbub |
| mahbub_s60 |
| View Public Profile |
| Find all posts by mahbub_s60 |
![]() thanx man |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| client server | vis_siv | General Symbian C++ | 5 | 2008-03-10 13:46 |
| Bluetooth OBEX Server | ravey72 | General Symbian C++ | 0 | 2008-03-02 02:28 |
| Want to make my application Client Server Architecture Supportibe | aamitgupta | General Symbian C++ | 4 | 2008-02-28 14:33 |
| Problem in reconnection from client to server | Palermo4Ever | Bluetooth Technology | 0 | 2006-06-19 17:27 |
| SMS application client & server side coding | skdas | General Symbian C++ | 1 | 2003-05-05 09:31 |