Home Forums Support Connection Lost Handler

Tagged: 

  • This topic has 1 reply, 2 voices, and was last updated 11 years ago by Anonymous.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1230
    Anonymous
    Inactive

    I am creating a Server-Client application where 500+ clients will connect to a server simultaneously.

    How can I add a Connection Lost Handler to Both Server and Client?

    Also It seems that Netcomms has no Connection Established Boolean. Thus how to check if Connection is present.

    Moreover the clients need to connect to the server when the server is alive. There is no reconnection count or reconnection try wait for the client to use.

    #1231
    Anonymous
    Inactive

    Heya Paul,

    Many kind thanks for your interest in our library and welcome to our forums.

    How can I add a Connection Lost Handler to Both Server and Client?

    You can either configure a global connection close handler using NetworkComms.AppendGlobalConnectionCloseHandler or a connection specific one using Connection.AppendShutdownHandler.

    Also It seems that Netcomms has no Connection Established Boolean. Thus how to check if Connection is present.

    If you have a reference to the connection in question look at the properties of Connection.ConnectionInfo, i.e. ConnectionInfo.ConnectionState.

    If you don’t have a connection reference see NetworkComms.ConnectionExists or NetworkComms.GetExistingConnection methods.

    Moreover the clients need to connect to the server when the server is alive. There is no reconnection count or reconnection try wait for the client to use.

    There are several desirable solutions for when a connection is closed or lost. As a consequence we leave this down to the end user. For example you could implement a reconnection attempt from within a connection close handler as discussed above.

    Kind regards,
    Marc

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.