Results 1 to 4 of 4

Thread: rejectConnection outside onConnect method does not work

  1. #1
    Join Date
    Feb 2010
    Posts
    9

    Default rejectConnection outside onConnect method does not work

    I have to logoff some clients with client.rejectConnection().
    My problem is that does not work outside onConnect method.
    I cannot use other method like client.setShutdownClient(true). The message on the Flash client must be reject and no disconnect because these are treated differently.
    I seek a solution to reject clients outside onConnect method if this is possible.

    Thank you!

  2. #2

    Default

    Outside of onConnect you must use client.setShutdownClient(true). That is the proper way to do it.

    Charlie

  3. #3
    Join Date
    Dec 2007
    Posts
    25,655

    Default

    You can send any notification you want before you do the shutdown, for example:

    Code:
    sendStreamOnStatusError(stream, "NetConnection.Connect.Rejected", "Rejected");
    The above is NetConnection notification being sent on stream, so you might have to modify the client, though some clients handle NetConnection and NetStream NetStatusEvent notifications in the same function.

    Richard

  4. #4
    Join Date
    Feb 2010
    Posts
    9

    Default

    Thank you!
    V. Pirone

Posting Permissions

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