Go to Page... |
Compatibility: | Blackwood (7.0.5) |
Updated: | 08/20/21 02:09 PM |
Created: | 04/01/16 01:30 PM |
Monthly downloads: | 2,000 |
Total downloads: | 250,888 |
Favorites: | 133 |
MD5: |
boolean isSet, number nextIndex, number nextBitIndex = lib:ReadBit(table data, number index, number bitIndex)
number nextIndex, number nextBitIndex = lib:WriteBit(table data, number index, number bitIndex, boolean value)
string character, number nextIndex = lib:ReadChar(table data, number index)
number nextIndex = lib:WriteChar(table data, number index, string value[, number charIndex])
number value, number nextIndex = lib:ReadUint8(table data, number index)
number nextIndex = lib:WriteUint8(table data, number index, string value)
number value, number nextIndex = lib:ReadUint16(table data, number index)
number nextIndex = lib:WriteUint16(table data, number index, string value)
number x, number y = lib:EncodeData(number b0, number b1, number b2, number b3, number stepSize)
number b0, number b1, number b2, number b3 = lib:DecodeData(number x, number y, number stepSize)
number value = lib:EncodeHeader(MessageType messageType, number length)
MessageType messageType, number length = lib:DecodeHeader(number value)
boolean isValid = lib:Send(MessageType messageType, table data)
table handler, table saveData = lib:RegisterHandler(MessageType messageType, table data)
table handler = lib:GetHandler(MessageType messageType)
lib:RegisterCallback(MessageType messageType, function callback)
lib:UnregisterCallback(MessageType messageType, function callback)
/lgs <1/0>
File Name |
Version |
Size |
Uploader |
Date |
r2 |
71kB |
sirinsidiator |
01/11/17 01:53 PM |
|
r1 |
70kB |
sirinsidiator |
04/01/16 01:30 PM |
![]() |
Comment Options |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|
|
Clarification on Message Types
Hi there, I'm interested in possibly using this library for a future add-on and I want to clarify the whole message type thing. You say in your description that there are 31 message types supported but only list 2 as possibilities. Does that mean we can create custom message types? How do we know what add-ons are using a message type that would be similar to our needs?
Thanks for any help in understanding what is going on here. |
![]() |
![]() |
static_recharge |
View Public Profile |
Send a private message to static_recharge |
Send email to static_recharge |
Find More Posts by static_recharge |
Add static_recharge to Your Buddy List |
![]() |
|
Forum posts: 3
File comments: 53
Uploads: 0
|
There seems to be an issue with the standalone LIB GPS and the one included in your file which is causing issues in mods like MapPins, Raid Notifier etc. Would you care to update your file please?
![]() |
![]() |
![]() |
DarkRuler2500 |
View Public Profile |
Send a private message to DarkRuler2500 |
Send email to DarkRuler2500 |
Find More Posts by DarkRuler2500 |
Add DarkRuler2500 to Your Buddy List |
![]() |
|||
|
Re: Re: sending seems to stop occasionally
Right now, I'm sending player information every second but I could (and should) only send information if something changes. |
||
![]() |
![]() |
marlonbrando |
View Public Profile |
Send a private message to marlonbrando |
Send email to marlonbrando |
Find More Posts by marlonbrando |
Add marlonbrando to Your Buddy List |
![]() |
||
Re: sending seems to stop occasionally
|
||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|
|
sending seems to stop occasionally
I've recently rewritten my addon to use LibGroupSocket rather than LibMapPing at a great decrease in code size and complexity. Thanks. Great library.
I have a problem that is difficult (for me) to debug, though. Every so often one player seemingly stops sending even when LGS:Send() does not return false. I haven't been able to figure out what causes the issue, though. I thought maybe it happened to player a when player b logs out or when player b zones a lot but I can't confirm that. When player seems to stops sending, both player a and player b see player b's pings but neither sees pings from a. Any hints on the best way to debug this? I can obviously just start sprinkling debugging d()'s throughout LibGroupSocket but that has a tendency to overload chat and sometimes the issue takes five minutes or more to crop up. Is there a more elegant way to debug a situation where a player apparently isn't sending? I think I've debugged this all the way down to the point where the code is calling LGS:Send so I don't think it's something obviously wrong with my code although typing this could very well lead to an aha! moment once I hit "Submit Reply". |
![]() |
![]() |
marlonbrando |
View Public Profile |
Send a private message to marlonbrando |
Send email to marlonbrando |
Find More Posts by marlonbrando |
Add marlonbrando to Your Buddy List |
![]() |
||
|
Last edited by Solinur : 01/14/18 at 05:57 PM.
|
|
![]() |
![]() |
Solinur |
View Public Profile |
Send a private message to Solinur |
Send email to Solinur |
Find More Posts by Solinur |
Add Solinur to Your Buddy List |
![]() |
|||
|
Even if there was one, it should be the sole responsibility of the addon utilizing the library to control whether sending is permitted. Making such a user-unfriendly requirement to utilize this library just incentives people to make their own communication protocols (like FTC and Roll Call, both which can cause interference), which is something I'm thinking of doing myself. |
||
![]() |
![]() |
Tactitocalon |
View Public Profile |
Send a private message to Tactitocalon |
Send email to Tactitocalon |
Find More Posts by Tactitocalon |
Add Tactitocalon to Your Buddy List |
![]() |
|||
Last edited by sirinsidiator : 01/07/18 at 07:26 AM.
|
|||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|
|
Can LGS be modified so that saveData.enabled is on by default?
|
![]() |
![]() |
Tactitocalon |
View Public Profile |
Send a private message to Tactitocalon |
Send email to Tactitocalon |
Find More Posts by Tactitocalon |
Add Tactitocalon to Your Buddy List |
![]() |
||||
The handlers implement their own enabled switch and settings: Lua Code:
Lua Code:
|
||||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|||
|
It seems that if "saveData.enabled" is set to false, message sending is disabled regardless of what the message type is. Code:
function lib:Send(messageType, data) if(not saveData.enabled) then return false end if(not IsValidMessageType(messageType)) then Log("tried to send invalid messageType %s", tostring(messageType)) return false end if(not IsValidData(data)) then return false end -- TODO like all other api functions, this one also has a message rate limit. We need to avoid sending too much or we risk getting kicked lib.outgoing[#lib.outgoing + 1] = OutgoingPacket:New(messageType, data) if(not lib.isSending) then DoSend() else lib.hasMore = true end return true end
Last edited by Tactitocalon : 01/05/18 at 06:28 PM.
|
||
![]() |
![]() |
Tactitocalon |
View Public Profile |
Send a private message to Tactitocalon |
Send email to Tactitocalon |
Find More Posts by Tactitocalon |
Add Tactitocalon to Your Buddy List |
![]() |
||
|
|
|
![]() |
![]() |
Solinur |
View Public Profile |
Send a private message to Solinur |
Send email to Solinur |
Find More Posts by Solinur |
Add Solinur to Your Buddy List |
![]() |
|
|
Can the sending permissions be changed to:
- have a different enabled flag for each MessageType - be controllable by dependent addons (expose access to the enabled flag) rather than being only controlled by the library Currently this library is not very usable because it requires the user to jump through a lot of hoops in order to enable sending, but there is no granularity for controlling which message types are and are not allowed to be sent. |
![]() |
![]() |
Tactitocalon |
View Public Profile |
Send a private message to Tactitocalon |
Send email to Tactitocalon |
Find More Posts by Tactitocalon |
Add Tactitocalon to Your Buddy List |
![]() |
|
|
Will this lib be updated and supported?
|
![]() |
![]() |
Taonnor |
View Public Profile |
Send a private message to Taonnor |
Send email to Taonnor |
Visit Taonnor's homepage! |
Find More Posts by Taonnor |
Add Taonnor to Your Buddy List |
![]() |
You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.