libkipr  1.0.0
Socket Class Reference

#include <socket.hpp>

Public Member Functions

 Socket ()
 
bool open (int domain, int type, int protocol)
 
bool isOpen () const
 
bool setBlocking (const bool blocking)
 
bool setReusable (const bool reusable)
 
bool bind (const unsigned short port)
 
bool connect (const Address &addr)
 
bool disconnect ()
 
bool close ()
 
ssize_t recv (void *const buffer, const size_t length, int flags=0)
 
ssize_t recvfrom (void *const buffer, const size_t length, Address &address, int flags=0)
 
ssize_t send (const void *const buffer, const size_t length, int flags=0)
 
ssize_t sendto (const void *const buffer, const size_t length, const Address &dest, int flags=0)
 
socket_fd_t fd () const
 

Static Public Member Functions

static Socket udp ()
 
static Socket tcp ()
 

Constructor & Destructor Documentation

◆ Socket()

Socket::Socket ( )

Member Function Documentation

◆ bind()

bool Socket::bind ( const unsigned short  port)

◆ close()

bool Socket::close ( )

◆ connect()

bool Socket::connect ( const Address addr)

◆ disconnect()

bool Socket::disconnect ( )

◆ fd()

socket_fd_t Socket::fd ( ) const

◆ isOpen()

bool Socket::isOpen ( ) const

◆ open()

bool Socket::open ( int  domain,
int  type,
int  protocol 
)

◆ recv()

ssize_t Socket::recv ( void *const  buffer,
const size_t  length,
int  flags = 0 
)

◆ recvfrom()

ssize_t Socket::recvfrom ( void *const  buffer,
const size_t  length,
Address address,
int  flags = 0 
)

◆ send()

ssize_t Socket::send ( const void *const  buffer,
const size_t  length,
int  flags = 0 
)

◆ sendto()

ssize_t Socket::sendto ( const void *const  buffer,
const size_t  length,
const Address dest,
int  flags = 0 
)

◆ setBlocking()

bool Socket::setBlocking ( const bool  blocking)

◆ setReusable()

bool Socket::setReusable ( const bool  reusable)

◆ tcp()

static Socket Socket::tcp ( )
static

◆ udp()

static Socket Socket::udp ( )
static

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