Initial RetroNFS95 Win9x VxD prototype

This commit is contained in:
2026-10-12 12:59:15 +00:00
commit 908ece2cc8
51 changed files with 3266 additions and 0 deletions

38
include/socket.hpp Normal file
View File

@@ -0,0 +1,38 @@
#ifndef RETRONFS95_SOCKET_HPP
#define RETRONFS95_SOCKET_HPP
#include "compat.hpp"
namespace retronfs {
class SocketSystem {
public:
SocketSystem();
~SocketSystem();
};
class TcpSocket {
public:
TcpSocket();
~TcpSocket();
void connect_to(const std::string& host, unsigned short port, unsigned timeout_ms);
void send_all(const Bytes& data);
Bytes recv_exact(unsigned count);
void close();
private:
TcpSocket(const TcpSocket&);
TcpSocket& operator=(const TcpSocket&);
#ifdef _WIN32
unsigned int fd_;
#else
int fd_;
#endif
};
}
#endif