+ Reply to Thread
Results 1 to 9 of 9

Thread: iOS - ConnectandLogin - onConnectionClosedEvent

  1. #1
    Member
    Join Date
    Mar 2012
    Posts
    33
    Thanks
    1
    Thanked 0 Times in 0 Posts

    iOS - ConnectandLogin - onConnectionClosedEvent

    Hi

    i am trying with connectandlogin example ; tested with below scenario.

    1. added onConnectionClosedEvent listener
    2. implemented method required for above listener
    3. now when i run example , it connects user successfully and login also.
    4. but at time of closing ESSever manually.... it is not throwing any event to listener of connection closed.

    Any idea ? [ we do not prefer to have timer in place for this]

    Thanks

  2. #2
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,209
    Thanks
    80
    Thanked 1,086 Times in 1,075 Posts
    Are you closing the ES5 server before the user logs in or afterward? You won't get a ConnectionClosedEvent if the original connection fails due to the ES5 server not being reached.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  3. #3
    Member
    Join Date
    Mar 2012
    Posts
    33
    Thanks
    1
    Thanked 0 Times in 0 Posts
    No. I am not closing the connection before connecting or login. And also, the user is connected and logged in successfully. What could be the problem?

    Simply I have added the listener immediate after the two listeners (for connection response and login response).

    But it doesn't get called, when I stop the server manually.

    Thanks for prompt reply.

  4. #4
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,209
    Thanks
    80
    Thanked 1,086 Times in 1,075 Posts
    If you are using the same syntax as the other listeners, then this sounds like a bug in our api. I'll add a ticket to our system about it.

    edit: which version of the ES5 client api are you using?
    Last edited by tcarr; 07-02-2012 at 03:11 PM.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  5. #5
    Member
    Join Date
    Mar 2012
    Posts
    33
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Yes syntax is same like other listeners. We are using 5.3.2 API for cocoa touch.

  6. #6
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,209
    Thanks
    80
    Thanked 1,086 Times in 1,075 Posts
    Thanks! I'll let Jason know it's 5.3.2.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  7. #7
    Member
    Join Date
    Mar 2012
    Posts
    33
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Can we know that if it is bug then how much time it will take to get resolved ?

  8. #8
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,209
    Thanks
    80
    Thanked 1,086 Times in 1,075 Posts
    How much time it will take for a fix depends on the type of bug, assuming Jason reproduces it. I'll let you know when we have a beta build of the updated api.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  9. #9
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,209
    Thanks
    80
    Thanked 1,086 Times in 1,075 Posts
    Jason was unable to reproduce this error using the ES5.3.2 iOS client api, and an ES5.3.2 server. This is the code that he added to the example:
    Code:
    [es.engine addEventListenerWithTarget:self action:@selector(onConnectionClosed:) eventIdentifier:EsMessageType_ConnectionClosedEvent];
    
    - (void) onConnectionClosed:(EsConnectionClosedEvent*) event {
        DLOG(@"onConnectionClosed");
    }
    And here are the logs that he saw during testing, starting with the successful LoginResponse:
    Code:
    2012-07-02 10:45:38.241 cocoa-touch-tests[18681:f803] -[EsManagerHelper onLoginResponse:]: onLoginResponse
    2012-07-02 10:45:38.242 cocoa-touch-tests[18681:f803] -[EsUserManager addUser:]: addUser
    2012-07-02 10:45:38.242 cocoa-touch-tests[18681:f803] Login Accepted: true
    2012-07-02 10:45:38.243 cocoa-touch-tests[18681:f803] -[EsEngine checkMessageOrder:connection:]: Queued messages 0
    2012-07-02 10:45:46.612 cocoa-touch-tests[18681:f803] -[EsSocketConnection stream:handleEvent:]: stream handleEvent 2
    2012-07-02 10:45:46.617 cocoa-touch-tests[18681:f803] -[EsSocketConnection stream:handleEvent:]: NSStreamEventHasBytesAvailable
    2012-07-02 10:45:46.617 cocoa-touch-tests[18681:f803] -[EsSocketConnection stream:handleEvent:]: stream handleEvent 16
    2012-07-02 10:45:46.618 cocoa-touch-tests[18681:f803] -[EsSocketConnection stream:handleEvent:]: NSStreamEventEndEncountered
    2012-07-02 10:45:46.621 cocoa-touch-tests[18681:f803] -[cocoa_touch_testsAppDelegate onConnectionClosed:]: 
    onConnectionClosed
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

+ Reply to Thread

Tags for this Thread

Posting Permissions

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