You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have the events connection, pre-disconnection and disconnection.
Is it planned to give a user a way to add custom / more advanced types of events?
I think of events such as:
*A message / data packet with specific content received, treat it elsewhere different from everything else.
TCP connection still persists, but the last data packet received was some time ago, treat this case, e.g. with sending a "ping" (and hopefully receiving a "pong").
Connection to other side lost (as a special case of disconection).
The text was updated successfully, but these errors were encountered:
@Mengel38 I'm open to adding events of other types.
However, I'm not a fan of an event that searches for data containing specific content. You can already achieve this by assigning opcodes to data that you send. When a specific opcode is received, special processing can be performed. I have an example of this in the README.
Currently, you also have the ability to track and update the last time a Client received any data from the Server by using an IdentityHashMap<Client, Instant>.
Regarding an event that would fire if a Client unexpectedly lost connection to the Server, I think is a reasonable request. I'll look into adding this soon.
We have the events connection, pre-disconnection and disconnection.
Is it planned to give a user a way to add custom / more advanced types of events?
I think of events such as:
*A message / data packet with specific content received, treat it elsewhere different from everything else.
The text was updated successfully, but these errors were encountered: