#include <socket.hpp>
Public Member Functions | |
void | close () |
void | close () |
bool | dataAvailable () |
bool | dataAvailable () |
bool | isValid () const |
bool | isValid () const |
std::string | readLine () |
std::string | readLine () |
Socket (int socketID) | |
Socket (int socketID) | |
~Socket () | |
~Socket () | |
Private Member Functions | |
void | checkBufferOverflow () |
void | checkBufferOverflow () |
bool | lineAvailable () |
bool | lineAvailable () |
void | rawClose () |
void | rawClose () |
Private Attributes | |
int | begin |
char | buffer [BUFLENGTH] |
int | end |
int | ptrpos |
int | socket |
Friends | |
class | ::sockbuf |
Definition at line 36 of file install/include/orocos/ocl/socket.hpp.
OCL::TCP::Socket::Socket | ( | int | socketID | ) |
Create an incoming server socket.
port | Port to listen on. |
Definition at line 141 of file socket.cpp.
OCL::TCP::Socket::~Socket | ( | ) |
Definition at line 148 of file socket.cpp.
OCL::TCP::Socket::Socket | ( | int | socketID | ) |
Create an incoming server socket.
port | Port to listen on. |
OCL::TCP::Socket::~Socket | ( | ) |
void OCL::TCP::Socket::checkBufferOverflow | ( | ) | [private] |
Move all data in the buffer to the beginning of the buffer, if needed.
void OCL::TCP::Socket::checkBufferOverflow | ( | ) | [private] |
Move all data in the buffer to the beginning of the buffer, if needed.
Definition at line 207 of file socket.cpp.
void OCL::TCP::Socket::close | ( | ) |
Close the connection. Send a nice message to the user.
void OCL::TCP::Socket::close | ( | ) |
Close the connection. Send a nice message to the user.
Definition at line 278 of file socket.cpp.
bool OCL::TCP::Socket::dataAvailable | ( | ) |
Check wether there is new data available.
bool OCL::TCP::Socket::dataAvailable | ( | ) |
Check wether there is new data available.
Definition at line 161 of file socket.cpp.
bool OCL::TCP::Socket::isValid | ( | ) | const |
Check wether the state of the socket is valid or not.
bool OCL::TCP::Socket::isValid | ( | ) | const |
Check wether the state of the socket is valid or not.
Definition at line 156 of file socket.cpp.
bool OCL::TCP::Socket::lineAvailable | ( | ) | [private] |
Return true when a line which is already stored in the buffer is available. Terminate the line with and adjust ptrpos to this position.
Begin should be the beginning of the new line.
bool OCL::TCP::Socket::lineAvailable | ( | ) | [private] |
Return true when a line which is already stored in the buffer is available. Terminate the line with and adjust ptrpos to this position.
Begin should be the beginning of the new line.
Definition at line 166 of file socket.cpp.
void OCL::TCP::Socket::rawClose | ( | ) | [private] |
Close socket without any message to the client.
void OCL::TCP::Socket::rawClose | ( | ) | [private] |
Close socket without any message to the client.
Definition at line 268 of file socket.cpp.
std::string OCL::TCP::Socket::readLine | ( | ) |
Read a line from the socket.
std::string OCL::TCP::Socket::readLine | ( | ) |
Read a line from the socket.
Definition at line 222 of file socket.cpp.
friend class ::sockbuf [friend] |
Definition at line 37 of file install/include/orocos/ocl/socket.hpp.
int OCL::TCP::Socket::begin [private] |
Definition at line 71 of file install/include/orocos/ocl/socket.hpp.
char OCL::TCP::Socket::buffer [private] |
Definition at line 70 of file install/include/orocos/ocl/socket.hpp.
int OCL::TCP::Socket::end [private] |
Definition at line 73 of file install/include/orocos/ocl/socket.hpp.
int OCL::TCP::Socket::ptrpos [private] |
Definition at line 72 of file install/include/orocos/ocl/socket.hpp.
int OCL::TCP::Socket::socket [private] |
Socket ID
Definition at line 42 of file install/include/orocos/ocl/socket.hpp.