@@ -121,15 +121,15 @@ std::string SocketAddress::toString() const
121121
122122SocketAddress::SocketResult::Var SocketAddress::socket (const int socket_type) const
123123{
124- OwnFd out_fd;
124+ OwnedFd out_fd;
125125
126126 const auto & addr_generic = asGenericAddr ();
127127 if (const int err = platform::posixSyscallError ([this , socket_type, &addr_generic, &out_fd] {
128128 //
129129 const int fd = ::socket (addr_generic.sa_family , socket_type, 0 );
130130 if (fd != -1 )
131131 {
132- out_fd = OwnFd {fd};
132+ out_fd = OwnedFd {fd};
133133 }
134134 return fd;
135135 }))
@@ -158,7 +158,7 @@ SocketAddress::SocketResult::Var SocketAddress::socket(const int socket_type) co
158158 return out_fd;
159159}
160160
161- sdk::OptError SocketAddress::bind (const OwnFd & socket_fd) const
161+ sdk::OptError SocketAddress::bind (const OwnedFd & socket_fd) const
162162{
163163 const int raw_fd = socket_fd.get ();
164164 CETL_DEBUG_ASSERT (raw_fd != -1 , " " );
@@ -190,7 +190,7 @@ sdk::OptError SocketAddress::bind(const OwnFd& socket_fd) const
190190 return sdk::OptError{};
191191}
192192
193- sdk::OptError SocketAddress::connect (const OwnFd & socket_fd) const
193+ sdk::OptError SocketAddress::connect (const OwnedFd & socket_fd) const
194194{
195195 const int raw_fd = socket_fd.get ();
196196 CETL_DEBUG_ASSERT (raw_fd != -1 , " " );
@@ -212,14 +212,14 @@ sdk::OptError SocketAddress::connect(const OwnFd& socket_fd) const
212212 }
213213}
214214
215- cetl::optional<OwnFd > SocketAddress::accept (const OwnFd & server_fd)
215+ cetl::optional<OwnedFd > SocketAddress::accept (const OwnedFd & server_fd)
216216{
217217 CETL_DEBUG_ASSERT (server_fd.get () != -1 , " " );
218218
219219 while (true )
220220 {
221221 addr_len_ = sizeof (addr_storage_);
222- OwnFd client_fd{::accept (server_fd.get (), &asGenericAddr (), &addr_len_)};
222+ OwnedFd client_fd{::accept (server_fd.get (), &asGenericAddr (), &addr_len_)};
223223 if (client_fd.get () >= 0 )
224224 {
225225 if (const int err = platform::posixSyscallError ([&client_fd] {
@@ -289,7 +289,7 @@ cetl::optional<OwnFd> SocketAddress::accept(const OwnFd& server_fd)
289289
290290// / Disables Nagle's algorithm for TCP sockets, so that our small IPC packets are sent immediately.
291291// /
292- void SocketAddress::configureNoDelay (const OwnFd & fd)
292+ void SocketAddress::configureNoDelay (const OwnedFd & fd)
293293{
294294 if (const int err = platform::posixSyscallError ([&fd] {
295295 //
0 commit comments