add file input/output

This commit is contained in:
2025-02-26 00:07:06 +01:00
parent a2eb10ec6d
commit 37ff881819
2 changed files with 14 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ using FileStream = sp::IOStream<sp::FileTag, sp::PacketDispatcher, sp::PacketFac
int main() {
auto handler = std::make_shared<CustomPacketHandler>();
FileStream stream(sp::FileIO{"test.txt"});
FileStream stream(sp::FileIO{"test.txt", "text.txt"});
stream.GetDispatcher().RegisterHandler(PacketId::Disconnect, handler);
stream.GetDispatcher().RegisterHandler(PacketId::KeepAlive, handler);