LeviLamina
Loading...
Searching...
No Matches
ITcpSocket.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/threading/Async.h"
7#include "mc/deps/core/utility/pub_sub/Connector.h"
8#include "mc/platform/Result.h"
9
10namespace NetherNet {
11
13public:
14 // virtual functions
15 // NOLINTBEGIN
16 virtual ~ITcpSocket() = default;
17
18 virtual ::Bedrock::Threading::Async<::Bedrock::Result<uint64>> send(::gsl::span<::std::byte const> data) = 0;
19
20 virtual ::Bedrock::PubSub::Connector<void(::gsl::span<::std::byte const>)>& onDataReceived() = 0;
21
22 virtual ::Bedrock::PubSub::Connector<void(int)>& onClosed() = 0;
23
24 virtual void close() = 0;
25
26 virtual ::std::string getRemoteHost() const = 0;
27
28 virtual ushort getRemotePort() const = 0;
29
30 virtual ushort getLocalPort() const = 0;
31 // NOLINTEND
32};
33
34} // namespace NetherNet
Definition ITcpSocket.h:12