diff --git a/src/core/lib/event_engine/posix_engine/posix_system_api.cc b/src/core/lib/event_engine/posix_engine/posix_system_api.cc index 9db8bc5a76edb..87dd74723f823 100644 --- a/src/core/lib/event_engine/posix_engine/posix_system_api.cc +++ b/src/core/lib/event_engine/posix_engine/posix_system_api.cc @@ -20,19 +20,6 @@ #ifdef GRPC_POSIX_SOCKET #include -#endif // GRPC_POSIX_SOCKET - -#ifdef GRPC_HAVE_UNIX_SOCKET -#ifdef GPR_WINDOWS -// clang-format off -#include -#include -// clang-format on -#else -#include // IWYU pragma: keep -#include -#endif // GPR_WINDOWS -#endif namespace grpc_event_engine { namespace experimental { @@ -54,9 +41,7 @@ int PosixSystemApi::Bind(FileDescriptor fd, const struct sockaddr* addr, void PosixSystemApi::Close(FileDescriptor fd) const { close(fd.fd()); } int PosixSystemApi::Fcntl(FileDescriptor fd, int op, int args) const { -#ifdef GRPC_POSIX_SOCKET return fcntl(fd.fd(), op, args); -#endif } int PosixSystemApi::GetSockOpt(FileDescriptor fd, int level, int optname, @@ -94,4 +79,70 @@ int PosixSystemApi::SetSockOpt(FileDescriptor fd, int level, int optname, } } // namespace experimental -} // namespace grpc_event_engine \ No newline at end of file +} // namespace grpc_event_engine + +#else // GRPC_POSIX_SOCKET + +namespace grpc_event_engine { +namespace experimental { + +FileDescriptor PosixSystemApi::AdoptExternalFd(int fd) const { + grpc_core::Crash("unimplemented"); +} + +FileDescriptor PosixSystemApi::Socket(int domain, int type, + int protocol) const { + grpc_core::Crash("unimplemented"); +} + +int PosixSystemApi::Bind(FileDescriptor fd, const struct sockaddr* addr, + socklen_t addrlen) const { + grpc_core::Crash("unimplemented"); +} + +void PosixSystemApi::Close(FileDescriptor fd) const { + grpc_core::Crash("unimplemented"); +} + +int PosixSystemApi::Fcntl(FileDescriptor fd, int op, int args) const { + grpc_core::Crash("unimplemented"); +} + +int PosixSystemApi::GetSockOpt(FileDescriptor fd, int level, int optname, + void* optval, socklen_t* optlen) const { + grpc_core::Crash("unimplemented"); +} + +int PosixSystemApi::GetSockName(FileDescriptor fd, struct sockaddr* addr, + socklen_t* addrlen) const { + grpc_core::Crash("unimplemented"); +} + +int PosixSystemApi::GetPeerName(FileDescriptor fd, struct sockaddr* addr, + socklen_t* addrlen) const { + grpc_core::Crash("unimplemented"); +} + +int PosixSystemApi::Listen(FileDescriptor fd, int backlog) const { + grpc_core::Crash("unimplemented"); +} + +long PosixSystemApi::RecvMsg(FileDescriptor fd, struct msghdr* msg, + int flags) const { + grpc_core::Crash("unimplemented"); +} + +long PosixSystemApi::SendMsg(FileDescriptor fd, const struct msghdr* message, + int flags) const { + grpc_core::Crash("unimplemented"); +} + +int PosixSystemApi::SetSockOpt(FileDescriptor fd, int level, int optname, + const void* optval, socklen_t optlen) const { + grpc_core::Crash("unimplemented"); +} + +} // namespace experimental +} // namespace grpc_event_engine + +#endif // GRPC_POSIX_SOCKET