12 lines
291 B
TypeScript
12 lines
291 B
TypeScript
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;
|
|
} |