Added Raw socket type and SocketProtocol to implement ICMP
Renamed TcpSocketBuilder to SocketBuilder
Removed UdpSocketBuilder (merged with SocketBuilder)
This commit is contained in:
TheDoctor
2019-10-21 23:29:29 +01:00
parent 5f13265c5d
commit 03fad4e3d3
14 changed files with 280 additions and 336 deletions

View File

@ -81,16 +81,25 @@ namespace std::net
enum class SocketType
{
Unknown = -1,
Raw = 3, // SOCK_RAW
Datagram = 2, //SOCK_DGRAM
Streaming = 1, //SOCK_STREAM
};
enum class SocketProtocol
enum class AddressFamily
{
IPv4 = 2, // AF_INET
IPv6 = 23 // AF_INET6
};
enum class SocketProtocol
{
ICMP = 1,
ICMPIpv6 = 58,
Tcp = 6,
Udp = 17,
};
enum class SocketReceiveFlags
{
None = 0,