net/StaticSocketAddress: add struct sockaddr cast operators
This commit is contained in:
parent
54de8b8e77
commit
7f83d38bca
@ -56,6 +56,14 @@ public:
|
|||||||
size);
|
size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
operator struct sockaddr *() noexcept {
|
||||||
|
return reinterpret_cast<struct sockaddr *>(&address);
|
||||||
|
}
|
||||||
|
|
||||||
|
operator const struct sockaddr *() const noexcept {
|
||||||
|
return reinterpret_cast<const struct sockaddr *>(&address);
|
||||||
|
}
|
||||||
|
|
||||||
struct sockaddr *GetAddress() noexcept {
|
struct sockaddr *GetAddress() noexcept {
|
||||||
return reinterpret_cast<struct sockaddr *>(&address);
|
return reinterpret_cast<struct sockaddr *>(&address);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user