×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    20

    ActiveScheduler and a Chat Application

    So I've been tasked with developing a chat application for one of my classes. I am (obviously) going to use an active scheduler to help with the networking side of this guy. My question is, how do I use the AS to listen for the server's notifications of a new message arriving. The protocol we have implemented allows the client to notify the server of new messages and then the server will rebroadcast this message to all of its connected clients. I need to "listen" for that somehow.

    Any ideas?

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: ActiveScheduler and a Chat Application

    Look for sockets example in SDK, both reading and writing from/to the socket is covered.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    20

    Re: ActiveScheduler and a Chat Application

    Quote Originally Posted by ltomuta View Post
    Look for sockets example in SDK, both reading and writing from/to the socket is covered.
    I understand how to do it functionally, but logically is where I am having my questions. In a more logic based approach, how do I have the scheduler wait for another response?

    Also, is it a good idea to encapsulate the network side of this project in its own class?


    Edit: Let me elaborate - the examples deal with things such as a http request that will immediately return *something*... so when the scheduler goes from a send to a a receive it is guaranteed to get something. In my case it isn't and the client just needs to hold tight and wait until 1) the user does something or 2) the server sends a new message notification.
    Last edited by nichojo; 2008-02-10 at 21:30.

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,567

    Re: ActiveScheduler and a Chat Application

    The Active Scheduler is an "infinite" loop, which invokes RunL-s for Active Objects having a completed request. So the AS itself has nothing to do with API details of sockets or anything else, and it will definitely not cause any loss of data or pending events.
    Depending on the SDK you use, you can usually find a chat-like example in S[eries]60Ex\sockets (in case of S60 1st and 2nd edition), or S60Ex\Chat (in S60 3rd edition).

Similar Threads

  1. Is it ActiveScheduler Problem???
    By kiran10182 in forum Symbian C++
    Replies: 16
    Last Post: 2009-05-08, 19:40
  2. why can't open contact in my application?
    By bily_pan in forum Symbian C++
    Replies: 2
    Last Post: 2006-08-31, 15:28
  3. why can't open contact in my application?
    By bily_pan in forum Symbian
    Replies: 2
    Last Post: 2006-08-31, 15:27
  4. why can't open contact in my application?
    By bily_pan in forum Symbian User Interface
    Replies: 2
    Last Post: 2006-08-31, 02:19
  5. why can't open contact in my application?
    By bily_pan in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2006-08-30, 14:39

Posting Permissions

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