'init'
This commit is contained in:
12
app/providers/ProtocolProvider/useSender.ts
Normal file
12
app/providers/ProtocolProvider/useSender.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import Packet from "@/app/providers/ProtocolProvider/protocol/packet";
|
||||
import { useProtocol } from "./useProtocol";
|
||||
|
||||
export const useSender = () => {
|
||||
const {protocol} = useProtocol();
|
||||
|
||||
const send = (packet: Packet) => {
|
||||
protocol.sendPacket(packet);
|
||||
}
|
||||
|
||||
return send;
|
||||
}
|
||||
Reference in New Issue
Block a user