You Are Here:

Community: Developer Discussion Boards

#1 Old Client-Server Application through OBEX - 2008-05-09, 09:47

Join Date: Apr 2008
Posts: 36
Nemat
Offline
Registered User
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.........
Reply With Quote

#2 Old Re: Client-Server Application through OBEX - 2008-05-11, 17:32

Join Date: Mar 2008
Posts: 577
mahbub_s60's Avatar
mahbub_s60
Offline
Forum Nokia Expert
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
Reply With Quote

#3 Old Re: Client-Server Application through OBEX - 2008-05-13, 13:35

Join Date: Apr 2008
Posts: 36
Nemat
Offline
Registered User
Thnx for ur reply....
Will u plz tell me how both sockets can be put on listening mode?
Reply With Quote

#4 Old Re: Client-Server Application through OBEX - 2008-05-20, 13:26

Join Date: Mar 2008
Posts: 577
mahbub_s60's Avatar
mahbub_s60
Offline
Forum Nokia Expert
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
Reply With Quote

#5 Old Re: Client-Server Application through OBEX - 2008-05-26, 18:24

Join Date: May 2008
Posts: 15
eng.ppu
Offline
Registered User

thanx man
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
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

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia