2018-01-18 19:35:03 +00: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-20 01:41:44 +00:00
|
|
|
namespace Service::Sockets {
|
2018-01-18 19:35:03 +00:00
|
|
|
|
2018-03-25 09:41:00 +00:00
|
|
|
class BSD final : public ServiceFramework<BSD> {
|
2018-01-18 19:35:03 +00:00
|
|
|
public:
|
2018-03-25 09:41:00 +00:00
|
|
|
explicit BSD(const char* name);
|
|
|
|
~BSD() = default;
|
2018-01-18 19:35:03 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void RegisterClient(Kernel::HLERequestContext& ctx);
|
2018-02-22 10:04:23 +00:00
|
|
|
void StartMonitoring(Kernel::HLERequestContext& ctx);
|
2018-01-18 19:35:03 +00:00
|
|
|
void Socket(Kernel::HLERequestContext& ctx);
|
|
|
|
void Connect(Kernel::HLERequestContext& ctx);
|
|
|
|
void SendTo(Kernel::HLERequestContext& ctx);
|
2018-01-30 06:29:47 +00:00
|
|
|
void Close(Kernel::HLERequestContext& ctx);
|
2018-01-18 19:35:03 +00:00
|
|
|
|
|
|
|
/// Id to use for the next open file descriptor.
|
|
|
|
u32 next_fd = 1;
|
|
|
|
};
|
|
|
|
|
2018-04-20 01:41:44 +00:00
|
|
|
} // namespace Service::Sockets
|