#include <BluetoothServer.h>
Inheritance diagram for oasys::BluetoothServer:
Definition at line 33 of file BluetoothServer.h.
Public Member Functions | |
BluetoothServer (int socktype, BluetoothSocket::proto_t proto, char *logbase="/btserver") | |
int | timeout_accept (int *fd, bdaddr_t *addr, u_int8_t *channel, int timeout_ms) |
Try to accept a new connection, but don't block for more than the timeout milliseconds. | |
int | listen () |
System call wrapper. | |
int | accept (int *fd, bdaddr_t *addr, u_int8_t *channel) |
System call wrapper. |
oasys::BluetoothServer::BluetoothServer | ( | int | socktype, | |
BluetoothSocket::proto_t | proto, | |||
char * | logbase = "/btserver" | |||
) |
Definition at line 31 of file BluetoothServer.cc.
int oasys::BluetoothServer::listen | ( | ) |
System call wrapper.
Definition at line 39 of file BluetoothServer.cc.
References ASSERT, errno, oasys::BluetoothSocket::fd_, oasys::BluetoothSocket::LISTENING, oasys::LOG_DEBUG, oasys::LOG_ERR, oasys::Logger::logf(), and oasys::BluetoothSocket::set_state().
Referenced by oasys::BluetoothServerThread::bind_listen_start(), and dtn::BluetoothConvergenceLayer::interface_up().
int oasys::BluetoothServer::accept | ( | int * | fd, | |
bdaddr_t * | addr, | |||
u_int8_t * | channel | |||
) |
System call wrapper.
Definition at line 58 of file BluetoothServer.cc.
References oasys::IO::ACCEPT, errno, oasys::BluetoothSocket::fd_, oasys::BluetoothSocket::LISTENING, oasys::LOG_ERR, oasys::Logger::logf(), oasys::IOHandlerBase::monitor(), oasys::BluetoothSocket::proto_, oasys::BluetoothSocket::prototoa(), oasys::BluetoothSocket::rc_, oasys::BluetoothSocket::RFCOMM, oasys::BluetoothSocket::state_, and oasys::BluetoothSocket::statetoa().
Referenced by oasys::BluetoothServerThread::run(), and timeout_accept().
int oasys::BluetoothServer::timeout_accept | ( | int * | fd, | |
bdaddr_t * | addr, | |||
u_int8_t * | channel, | |||
int | timeout_ms | |||
) |
Try to accept a new connection, but don't block for more than the timeout milliseconds.
Definition at line 92 of file BluetoothServer.cc.
References oasys::IO::ACCEPT, accept(), ASSERT, oasys::IOERROR, oasys::IOHandlerBase::monitor(), and oasys::BluetoothSocket::poll_sockfd().
Referenced by oasys::BluetoothServerThread::run().