2018-01-18 11:35:03 -08:00
|
|
|
// Copyright 2018 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "core/hle/kernel/hle_ipc.h"
|
|
|
|
#include "core/hle/service/service.h"
|
|
|
|
|
2018-04-19 18:41:44 -07:00
|
|
|
namespace Service::Sockets {
|
2018-01-18 11:35:03 -08:00
|
|
|
|
2018-03-25 02:41:00 -07:00
|
|
|
class BSD final : public ServiceFramework<BSD> {
|
2018-01-18 11:35:03 -08:00
|
|
|
public:
|
2018-03-25 02:41:00 -07:00
|
|
|
explicit BSD(const char* name);
|
|
|
|
~BSD() = default;
|
2018-01-18 11:35:03 -08:00
|
|
|
|
|
|
|
private:
|
|
|
|
void RegisterClient(Kernel::HLERequestContext& ctx);
|
2018-02-22 02:04:23 -08:00
|
|
|
void StartMonitoring(Kernel::HLERequestContext& ctx);
|
2018-01-18 11:35:03 -08:00
|
|
|
void Socket(Kernel::HLERequestContext& ctx);
|
|
|
|
void Connect(Kernel::HLERequestContext& ctx);
|
|
|
|
void SendTo(Kernel::HLERequestContext& ctx);
|
2018-01-29 22:29:47 -08:00
|
|
|
void Close(Kernel::HLERequestContext& ctx);
|
2018-01-18 11:35:03 -08:00
|
|
|
|
|
|
|
/// Id to use for the next open file descriptor.
|
|
|
|
u32 next_fd = 1;
|
|
|
|
};
|
|
|
|
|
2018-04-19 18:41:44 -07:00
|
|
|
} // namespace Service::Sockets
|