Project Alice
Loading...
Searching...
No Matches
httplib::detail::SocketStream Class Referencefinal

#include <httplib.h>

Inheritance diagram for httplib::detail::SocketStream:
Collaboration diagram for httplib::detail::SocketStream:

Public Member Functions

 SocketStream (socket_t sock, time_t read_timeout_sec, time_t read_timeout_usec, time_t write_timeout_sec, time_t write_timeout_usec)
 
 ~SocketStream () override
 
bool is_readable () const override
 
bool is_writable () const override
 
ssize_t read (char *ptr, size_t size) override
 
ssize_t write (const char *ptr, size_t size) override
 
void get_remote_ip_and_port (std::string &ip, int &port) const override
 
void get_local_ip_and_port (std::string &ip, int &port) const override
 
socket_t socket () const override
 
- Public Member Functions inherited from httplib::Stream
virtual ~Stream ()=default
 
virtual bool is_readable () const =0
 
virtual bool is_writable () const =0
 
virtual ssize_t read (char *ptr, size_t size)=0
 
virtual ssize_t write (const char *ptr, size_t size)=0
 
virtual void get_remote_ip_and_port (std::string &ip, int &port) const =0
 
virtual void get_local_ip_and_port (std::string &ip, int &port) const =0
 
virtual socket_t socket () const =0
 
ssize_t write (const char *ptr)
 
ssize_t write (const std::string &s)
 

Detailed Description

Definition at line 3231 of file httplib.h.

Constructor & Destructor Documentation

◆ SocketStream()

httplib::detail::SocketStream::SocketStream ( socket_t  sock,
time_t  read_timeout_sec,
time_t  read_timeout_usec,
time_t  write_timeout_sec,
time_t  write_timeout_usec 
)
inline

Definition at line 5867 of file httplib.h.

◆ ~SocketStream()

httplib::detail::SocketStream::~SocketStream ( )
inlineoverridedefault

Member Function Documentation

◆ get_local_ip_and_port()

void httplib::detail::SocketStream::get_local_ip_and_port ( std::string &  ip,
int &  port 
) const
inlineoverridevirtual

Implements httplib::Stream.

Definition at line 5949 of file httplib.h.

Here is the call graph for this function:

◆ get_remote_ip_and_port()

void httplib::detail::SocketStream::get_remote_ip_and_port ( std::string &  ip,
int &  port 
) const
inlineoverridevirtual

Implements httplib::Stream.

Definition at line 5944 of file httplib.h.

Here is the call graph for this function:

◆ is_readable()

bool httplib::detail::SocketStream::is_readable ( ) const
inlineoverridevirtual

Implements httplib::Stream.

Definition at line 5878 of file httplib.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_writable()

bool httplib::detail::SocketStream::is_writable ( ) const
inlineoverridevirtual

Implements httplib::Stream.

Definition at line 5882 of file httplib.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read()

ssize_t httplib::detail::SocketStream::read ( char *  ptr,
size_t  size 
)
inlineoverridevirtual

Implements httplib::Stream.

Definition at line 5887 of file httplib.h.

Here is the call graph for this function:

◆ socket()

socket_t httplib::detail::SocketStream::socket ( ) const
inlineoverridevirtual

Implements httplib::Stream.

Definition at line 5954 of file httplib.h.

◆ write()

ssize_t httplib::detail::SocketStream::write ( const char *  ptr,
size_t  size 
)
inlineoverridevirtual

Implements httplib::Stream.

Definition at line 5933 of file httplib.h.

Here is the call graph for this function:

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