#include <BluetoothServer.h>
Inheritance diagram for oasys::BluetoothServer:
Definition at line 17 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 15 of file BluetoothServer.cc.
int oasys::BluetoothServer::listen | ( | ) |
System call wrapper.
Definition at line 23 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 dtn::BluetoothConvergenceLayer::Listener::accepted(), oasys::BluetoothServerThread::bind_listen_start(), dtn::BluetoothConvergenceLayer::Connection::connect(), and dtn::BluetoothConvergenceLayer::interface_up().
int oasys::BluetoothServer::accept | ( | int * | fd, | |
bdaddr_t * | addr, | |||
u_int8_t * | channel | |||
) |
System call wrapper.
Definition at line 42 of file BluetoothServer.cc.
References oasys::IO::ACCEPT, ASSERT, errno, oasys::BluetoothSocket::fd_, oasys::BluetoothSocket::init_sa(), oasys::BluetoothSocket::LISTENING, oasys::LOG_ERR, oasys::Logger::logf(), oasys::IOHandlerBase::monitor(), oasys::BluetoothSocket::poll_sockfd(), oasys::BluetoothSocket::sa_, oasys::BluetoothSocket::sa_baddr(), oasys::BluetoothSocket::sa_channel(), oasys::BluetoothSocket::slen_, oasys::BluetoothSocket::state_, and oasys::BluetoothSocket::ZERO.
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 71 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().