Seastar
High performance C++ framework for concurrent servers
Public Member Functions | Static Public Member Functions | List of all members
seastar::file_desc Class Reference

Public Member Functions

 file_desc (const file_desc &)=delete
 
 file_desc (file_desc &&x) noexcept
 
void operator= (const file_desc &)=delete
 
file_descoperator= (file_desc &&x)
 
void close ()
 
int get () const
 
file_desc dup () const
 
file_desc accept (socket_address &sa, int flags=0)
 
std::optional< file_desctry_accept (socket_address &sa, int flags=0)
 
void shutdown (int how)
 
void truncate (size_t size)
 
int ioctl (int request)
 
int ioctl (int request, int value)
 
int ioctl (int request, unsigned int value)
 
template<class X >
int ioctl (int request, X &data)
 
template<class X >
int ioctl (int request, X &&data)
 
template<class X >
int setsockopt (int level, int optname, X &&data)
 
int setsockopt (int level, int optname, const char *data)
 
int setsockopt (int level, int optname, const void *data, socklen_t len)
 
template<typename Data >
Data getsockopt (int level, int optname)
 
int getsockopt (int level, int optname, char *data, socklen_t len)
 
size_t size ()
 
std::optional< size_t > read (void *buffer, size_t len)
 
std::optional< ssize_t > recv (void *buffer, size_t len, int flags)
 
std::optional< size_t > recvmsg (msghdr *mh, int flags)
 
std::optional< size_t > send (const void *buffer, size_t len, int flags)
 
std::optional< size_t > sendto (socket_address &addr, const void *buf, size_t len, int flags)
 
std::optional< size_t > sendmsg (const msghdr *msg, int flags)
 
void bind (sockaddr &sa, socklen_t sl)
 
void connect (sockaddr &sa, socklen_t sl)
 
socket_address get_address ()
 
void listen (int backlog)
 
std::optional< size_t > write (const void *buf, size_t len)
 
std::optional< size_t > writev (const iovec *iov, int iovcnt)
 
size_t pread (void *buf, size_t len, off_t off)
 
void timerfd_settime (int flags, const itimerspec &its)
 
mmap_area map (size_t size, unsigned prot, unsigned flags, size_t offset, void *addr=nullptr)
 
mmap_area map_shared_rw (size_t size, size_t offset)
 
mmap_area map_shared_ro (size_t size, size_t offset)
 
mmap_area map_private_rw (size_t size, size_t offset)
 
mmap_area map_private_ro (size_t size, size_t offset)
 

Static Public Member Functions

static file_desc from_fd (int fd)
 
static file_desc open (sstring name, int flags, mode_t mode=0)
 
static file_desc socket (int family, int type, int protocol=0)
 
static file_desc eventfd (unsigned initval, int flags)
 
static file_desc epoll_create (int flags=0)
 
static file_desc timerfd_create (int clockid, int flags)
 
static file_desc temporary (sstring directory)
 
static file_desc inotify_init (int flags)
 

The documentation for this class was generated from the following file: