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