Skip to content

Commit

Permalink
Target
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindgamesnl committed Aug 24, 2023
1 parent c04219c commit d64ebc8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ public interface RpcTransport extends Closeable {
* if the packet was not handled, the transport implementation should continue processing the packet.
* the transport implementation should call the onReceive function, regardless of the ReadStatus.
*/
void onReceive(Function<byte[], ReadStatus> onReceive);
void onReceive(Direction target, Function<byte[], ReadStatus> onReceive);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.rpcnis.base.RpcTransport;
import com.rpcnis.base.enums.ReadStatus;
import com.rpcnis.core.executor.ImplementationWrapper;
import com.rpcnis.core.models.InvocationDescriptor;
import com.rpcnis.core.trackers.IncomingInvocationTracker;
import com.rpcnis.core.transport.packets.InvocationPacket;

Expand All @@ -25,7 +26,7 @@ public TransportHandler(RpcSerializer serializer, RpcTransport transport, Incomi

private ReadStatus onReceive(byte[] bytes) {
// deserialize the packet
InvocationPacket packet = serializer.deserialize(bytes, InvocationPacket.class);
InvocationDescriptor invocationDescriptor = serializer.deserialize(bytes, InvocationDescriptor.class);

// get the invocation handler for this packet
Collection<ImplementationWrapper> implementations = incomingInvocationTracker.getImplementations().get(packet.getProcedure());
Expand Down

This file was deleted.

0 comments on commit d64ebc8

Please sign in to comment.