Skip to content
This repository has been archived by the owner on Mar 11, 2023. It is now read-only.

GNOM/presence: informations for distant network objects #2

Open
Override-6 opened this issue Oct 8, 2021 · 0 comments
Open

GNOM/presence: informations for distant network objects #2

Override-6 opened this issue Oct 8, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Override-6
Copy link
Owner

Current informations only let the user know if a network object is stored on an engine id with the requested reference.

NetworkPresencesHandlers should be able to provide this kind of infroamtion to the user :

  • the object's type
  • the object itself (if allowed)
  • the object hashcode
  • the object class's checksum
  • is the distant object the same (class, hashcode, type, etc or equals) as this object for all engines (or one engine, or a list...)

Example

val linker = network.getGeneralNetworkObjectLinker
val presence = linker.getPresence(PacketTraffic / 0 / 7 / 5)
val friend = "Engine01Identifier" //the engine's identifier we want to extract informations
val isPresent = presence.isPresentOnEngine(friend) //true if the engine has opened any packet channel at 0/7/5
if (isPresent && presence.sameClass[MessagePacketChannel])) {
     //we are now sure that the engine have opened a MessagePacketChannel that we can use directly and use to send a message
      val channel = traffic.getInjectable(MessagePacketChannel, ChannelScopes.retains(friend))
      channel.sendMessage("Hello, Friend !")
} 
@Override-6 Override-6 changed the title GNOM/presence: informations for distant network object's GNOM/presence: informations for distant network objects Oct 8, 2021
@Override-6 Override-6 added the enhancement New feature or request label Oct 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant