WPILibC++ 2024.3.2
wpi::TCPStream Class Reference

#include </home/runner/work/allwpilib/allwpilib/wpinet/src/main/native/thirdparty/tcpsockets/include/wpinet/TCPStream.h>

Inheritance diagram for wpi::TCPStream:
wpi::NetworkStream

Public Member Functions

 ~TCPStream () override
 
size_t send (const char *buffer, size_t len, Error *err) override
 
size_t receive (char *buffer, size_t len, Error *err, int timeout=0) override
 
void close () final
 
std::string_view getPeerIP () const override
 
int getPeerPort () const override
 
void setNoDelay () override
 
bool setBlocking (bool enabled) override
 
int getNativeHandle () const override
 
 TCPStream (const TCPStream &stream)=delete
 
TCPStreamoperator= (const TCPStream &)=delete
 
- Public Member Functions inherited from wpi::NetworkStream
 NetworkStream ()=default
 
virtual ~NetworkStream ()=default
 
virtual size_t send (const char *buffer, size_t len, Error *err)=0
 
virtual size_t receive (char *buffer, size_t len, Error *err, int timeout=0)=0
 
virtual void close ()=0
 
virtual std::string_view getPeerIP () const =0
 
virtual int getPeerPort () const =0
 
virtual void setNoDelay ()=0
 
virtual bool setBlocking (bool enabled)=0
 
virtual int getNativeHandle () const =0
 
 NetworkStream (const NetworkStream &)=delete
 
NetworkStreamoperator= (const NetworkStream &)=delete
 

Friends

class TCPAcceptor
 
class TCPConnector
 

Additional Inherited Members

- Public Types inherited from wpi::NetworkStream
enum  Error { kConnectionClosed = 0 , kConnectionReset = -1 , kConnectionTimedOut = -2 , kWouldBlock = -3 }
 

Constructor & Destructor Documentation

◆ ~TCPStream()

wpi::TCPStream::~TCPStream ( )
override

◆ TCPStream()

wpi::TCPStream::TCPStream ( const TCPStream stream)
delete

Member Function Documentation

◆ close()

void wpi::TCPStream::close ( )
finalvirtual

Implements wpi::NetworkStream.

◆ getNativeHandle()

int wpi::TCPStream::getNativeHandle ( ) const
overridevirtual

Implements wpi::NetworkStream.

◆ getPeerIP()

std::string_view wpi::TCPStream::getPeerIP ( ) const
overridevirtual

Implements wpi::NetworkStream.

◆ getPeerPort()

int wpi::TCPStream::getPeerPort ( ) const
overridevirtual

Implements wpi::NetworkStream.

◆ operator=()

TCPStream & wpi::TCPStream::operator= ( const TCPStream )
delete

◆ receive()

size_t wpi::TCPStream::receive ( char *  buffer,
size_t  len,
Error err,
int  timeout = 0 
)
overridevirtual

Implements wpi::NetworkStream.

◆ send()

size_t wpi::TCPStream::send ( const char *  buffer,
size_t  len,
Error err 
)
overridevirtual

Implements wpi::NetworkStream.

◆ setBlocking()

bool wpi::TCPStream::setBlocking ( bool  enabled)
overridevirtual

Implements wpi::NetworkStream.

◆ setNoDelay()

void wpi::TCPStream::setNoDelay ( )
overridevirtual

Implements wpi::NetworkStream.

Friends And Related Function Documentation

◆ TCPAcceptor

friend class TCPAcceptor
friend

◆ TCPConnector

friend class TCPConnector
friend

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