View Single Post
04/04/16, 03:05 PM   #5
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
@uladz I did only some basic tests, but there is definitely a send rate limit. Calling send 100 times in a loop did get me kicked for message spam. Generally speaking you should strife to send as little as possible, because all message types count towards the same limit and once there are more message types, the send queue could get clogged with pings that cannot be sent. Right now I send a maximum of two pings per second in combat for the resource message, but I may have to adjust that in the future once I did some more tests to find out the exact limit. I also plan to add a throttle so reaching the limit does not kick the player and also something that allows old packages to be dropped if they are queued for too long and become obsolete.

The message itself is also very limited and can only hold a maximum of 3 bytes in one ping or 7 bytes in two pings (one byte is reserved as a header).

@Baertram Yes. A message type is supposed to implement a handler (see ResourceHandler.lua), which serializes and deserializes data and fires callbacks when a message is received. Addons can register to them and react to the incoming data. The outgoing part is to be implemented in said handler, to allow all addons to have the same basis for the data.

@Ayantir What I mean is that instead of having 10 different addons implement their own dps message type, have one dps message type for all of them that is compatible with each.

EDIT: If an addon cannot separate the data collection into a handler because it is too complicated, that's also okay. But once we reach the messageType limit, it is time to get creative.

Last edited by sirinsidiator : 04/04/16 at 03:10 PM.
  Reply With Quote