Package net.openosrs.api.dispatch
Class PacketDispatcher
- java.lang.Object
-
- net.openosrs.api.dispatch.PacketDispatcher
-
@Singleton public class PacketDispatcher extends java.lang.ObjectPacket-only dispatch through revisioned reflection hooks. Every claim made here is command-level: atruereturn means the client accepted the built packet into its queue — server observation is a P7 concern.
-
-
Constructor Summary
Constructors Constructor Description PacketDispatcher(net.runelite.api.Client client, Hooks hooks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanavailable()True only when hooks loaded AND bind-time verification succeeded.booleancipherReady()True once the Isaac cipher is seeded (i.e.java.lang.StringdryRunAll()Dry-run EVERY packet that carries a layout.java.lang.StringdryRunById(int id, java.lang.Object... values)Replay one packet's VERIFIED layout against a STANDALONE scratch buffer and report the exact byte count written.booleansend(java.lang.String packetName, java.lang.Object... values)Send a packet by semantic name.booleansendById(int id, java.lang.Object... values)Send a packet by opcode when a revision table has no semantic name.java.lang.StringverifyBind()Force the reflection bind now and return a diagnostic summary.
-
-
-
Constructor Detail
-
PacketDispatcher
@Inject public PacketDispatcher(net.runelite.api.Client client, Hooks hooks)
-
-
Method Detail
-
available
public boolean available()
True only when hooks loaded AND bind-time verification succeeded.
-
cipherReady
public boolean cipherReady()
True once the Isaac cipher is seeded (i.e. we are logged in).
-
verifyBind
public java.lang.String verifyBind()
Force the reflection bind now and return a diagnostic summary. Runs the full structural gate against the LIVE client classes.- Throws:
java.lang.IllegalStateException- when any gate fails (tier self-disables)
-
dryRunById
public java.lang.String dryRunById(int id, java.lang.Object... values)Replay one packet's VERIFIED layout against a STANDALONE scratch buffer and report the exact byte count written. CRITICAL SAFETY NOTE (learned live 2026-08-26): we intentionally do NOT call the real node factory here. The factory writes the cipher-encrypted packet header, consuming one ISAAC keystream value per call; burning keystream without transmitting desyncs the client from the server and causes a disconnect. Scratch buffers are fully isolated: no pool, no writer, no cipher, no network. The layout width sum is the hard proof. The injected client may store the public offset through an obfuscation multiplier, so a raw reflective offset delta is diagnostic only and never revokes a structurally valid layout.
-
dryRunAll
public java.lang.String dryRunAll()
Dry-run EVERY packet that carries a layout. One login funds the whole table's verification: returns "ok=N fail=M" plus up to ten distinct failure signatures for offline fixing.
-
send
public boolean send(java.lang.String packetName, java.lang.Object... values)Send a packet by semantic name. Values are supplied one-per-verified payload write operation; an arity mismatch is rejected before the node factory runs so it cannot consume an ISAAC value for an invalid request.
-
sendById
public boolean sendById(int id, java.lang.Object... values)Send a packet by opcode when a revision table has no semantic name.
-
-