#include <SockOp.hh>
Public Member Functions | |
| clSockOp () | |
| clSockOp (int) | |
| ~clSockOp () | |
| void | SetHandle (int) |
| Set handle. | |
| void | Close () |
| Close handle/connection. | |
| bool | ReadSelect (int) |
| Wait for socket to become readable. | |
| bool | WriteSelect (int) |
| Wait for socket to become writable. | |
| int | Read (void *, int) |
| Read data. | |
| int | Write (const void *, int) |
| Write data. | |
| int | ReadN (void *, int) |
| Read N bytes. | |
| int | WriteN (const void *, int) |
| Write N bytes. | |
| int | Receive (void *, int, int) |
| Receive data. | |
| int | Send (const void *, int, int) |
| Send data. | |
| int | ReceiveMsg (struct msghdr *, int) |
| Receive message. | |
| int | SendMsg (const struct msghdr *, int) |
| Send message. | |
| int | Shutdown (int) |
| Shutdown connection. | |
| int | GetSockName (struct sockaddr *, socklen_t *) |
| Get address of this end. | |
| int | GetPeerName (struct sockaddr *, socklen_t *) |
| Get address of remote end. | |
| bool | SetBlocking (bool) |
| Set blocking/nonblocking IO. | |
| bool | SetKeepAlive () |
| Enable keepalive messages. | |
| bool | SetLinger (int) |
| Enable linger option. | |
| int | GetRecvBufSize () |
| Get receive buffer size. | |
| bool | SetRecvBufSize (int) |
| Set receive buffer size. | |
| int | GetSendBufSize () |
| Get send buffer size. | |
| bool | SetSendBufSize (int) |
| Set send buffer size. | |
| int | GetRecvBufLowWater () |
| Get position of receive buffer low-water sign. | |
| bool | SetRecvBufLowWater (int) |
| Set receive buffer low-water sign. | |
| int | GetSendBufLowWater () |
| Get position of send buffer low-water sign. | |
| bool | SetSendBufLowWater (int) |
| Set send buffer low-water sign. | |
| bool | SetRecvTimeout (int) |
| Set receive timeout. | |
| bool | SetSendTimeout (int) |
| Set send timeout. | |
| bool | SetTCPKeepAlive (int) |
| Set interval of TCP keepalive messages. | |
| bool | DisableNagle () |
| Disable TCP nagle-algorithm. | |
| bool | SetNagle (bool) |
| bool | SetTypeOfService (int) |
| Set type-of-service flag. | |
| void | SetCloseOnDestruct (bool) |
| Close handle/connection in destructor. | |
| int | GetHandle () |
| Get handle (file descriptor). | |
| int | GetErrno () |
| Get errno. | |
Private Attributes | |
| int | iErrno |
| int | iRetVal |
| int | iSockH |
| bool | bCloseOnDestruct |
Definition at line 39 of file SockOp.hh.
|
|
Definition at line 38 of file SockOp.cc. References bCloseOnDestruct, and iSockH. |
|
|
Definition at line 45 of file SockOp.cc. References bCloseOnDestruct, and iSockH. |
|
|
Definition at line 52 of file SockOp.cc. References bCloseOnDestruct, and iSockH. |
|
|
|
Close handle/connection.
Definition at line 65 of file SockOp.cc. References iSockH. Referenced by clGUILofar::OnConnectClick(), clGUILocate::OnConnectClick(), clGUILevel::OnConnectClick(), clBeamAudioUI::OnConnectClick(), clGUILofar::OnGdkInput(), clGUILocate::OnGdkInput(), clGUILevel::OnGdkInput(), clSoundProxy::ServeClientThread(), SetHandle(), clSoundUI::SoundInThread(), and clSoundProxy::SoundInThread(). |
|
|
Wait for socket to become readable.
Definition at line 75 of file SockOp.cc. References iErrno, and iSockH. Referenced by clSpectrum::ConnectStream(), clLevel::ConnectStream(), clDirection3::ConnectStream(), clDirection2::ConnectStream(), clBeamAudio::ConnectStream(), clSpectGUI::GdkInput(), clLofarDemon::GetDataHdr(), clDirection::GetFirstMsg(), clLevel::GetRequest(), clDirection::GetRequest(), clLofarDemon::GetRequestMsg(), clSpectrum::GetRq(), clDirection3::GetRq(), clDirection2::GetRq(), clBeamAudio::GetRq(), main(), clGUILofar::OnGdkInput(), clGUILocate::OnGdkInput(), clGUILevel::OnGdkInput(), clBeamAudioUI::OnGdkInput(), clBeamAudio::ProcessLoop(), clLevel::ReceiveData(), clDirection::ReceiveData(), clBeamAudioUI::SendSettings(), clSoundUI::SoundInThread(), and clSoundProxy::SoundInThread(). |
|
|
Wait for socket to become writable.
Definition at line 100 of file SockOp.cc. References iErrno, and iSockH. Referenced by clLofarDemon::SendResults(), clDirection::SendResults(), clSoundProxy::ServeClientThread(), and clBeamAudioUI::UpdateSettings(). |
|
||||||||||||
|
Read data.
Definition at line 125 of file SockOp.cc. References iErrno, iRetVal, and iSockH. Referenced by main(). |
|
||||||||||||
|
Write data.
|
|
||||||||||||
|
Read N bytes. Ensures that N bytes are read, unless error occurs.
Definition at line 141 of file SockOp.cc. References iErrno, iRetVal, and iSockH. Referenced by clStreamDist::AudioInThread(), clSpectrum::ConnectStream(), clSaveSrv::ConnectStream(), clLevel::ConnectStream(), clDirection3::ConnectStream(), clDirection2::ConnectStream(), clBeamAudio::ConnectStream(), clGUILocate::ConnectToServer(), clSpectGUI::GdkInput(), clSpectrum::GetData(), clLofarDemon::GetDataHdr(), clDirection::GetFirstMsg(), clLevel::GetRequest(), clDirection::GetRequest(), clLofarDemon::GetRequestMsg(), clSpectrum::GetRq(), clDirection3::GetRq(), clDirection2::GetRq(), clBeamAudio::GetRq(), clBeamSrv2Master::InDataThread(), clBeamSrvMaster::InDataThread(), main(), clSubLocate::Main(), clBeamSrv2Master::Main(), clBeamSrvMaster::Main(), clLofarDemon::MainLoop(), clGUILofar::OnGdkInput(), clGUILocate::OnGdkInput(), clGUILevel::OnGdkInput(), clGUIDir::OnGdkInput(), clBeamAudioUI::OnGdkInput(), clSaveSrv::ProcessLoop(), clDirection3::ProcessLoop(), clDirection2::ProcessLoop(), clBeamAudio::ProcessLoop(), clLevel::ReceiveData(), clDirection::ReceiveData(), clBeamAudioUI::SendSettings(), clXMMSOut::ServeClientThread(), clStreamDist::ServeClientThread(), clSoundUI::SoundInThread(), and clSoundProxy::SoundInThread(). |
|
||||||||||||
|
Write N bytes. Ensures that N bytes are written, unless error occurs.
Definition at line 160 of file SockOp.cc. References iErrno, iRetVal, and iSockH. Referenced by clSubLocate::ConnectDir(), clSpectrum::ConnectStream(), clSaveSrv::ConnectStream(), clLevel::ConnectStream(), clDirection3::ConnectStream(), clDirection2::ConnectStream(), clBeamAudio::ConnectStream(), clGUILevel::ConnectToServer(), clLofarDemon::GetDataHdr(), clDirection::GetFirstMsg(), clSpectGUI::InitConnection(), clGUILofar::InitConnection(), clGUIDir::InitConnection(), clBeamAudioUI::InitConnection(), main(), clBeamSrv2Master::Main(), clBeamSrvMaster::Main(), clSpectrum::ProcessLoop(), clDirection3::ProcessLoop(), clDirection2::ProcessLoop(), clBeamAudio::SendFirst(), clLevel::SendResult(), clBeamAudio::SendResult(), clLofarDemon::SendResults(), clDirection::SendResults(), clSpectGUI::SendSettings(), clGUILofar::SendSettings(), clGUILevel::SendSettings(), clGUIDir::SendSettings(), clBeamAudioUI::SendSettings(), clXMMSOut::ServeClientThread(), clStreamDist::ServeClientThread(), clSoundSrvA::ServeClientThread(), clSoundSrv2::ServeClientThread(), clSoundProxy::ServeClientThread(), clLocate::ServeClientThread(), clFileSrv::ServeClientThread(), clComediSrv::ServeClientThread(), clBeamSrv2Master::ServeClientThread(), clBeamSrvMaster::ServeClientThread(), and clBeamAudioUI::UpdateSettings(). |
|
||||||||||||||||
|
Receive data.
|
|
||||||||||||||||
|
Send data.
|
|
||||||||||||
|
Receive message.
|
|
||||||||||||
|
Send message.
|
|
|
Shutdown connection.
Definition at line 212 of file SockOp.cc. References iErrno, iRetVal, and iSockH. Referenced by main(), clGUILofar::OnConnectClick(), clGUIDir::OnConnectClick(), clGUILofar::OnGdkInput(), clGUIDir::OnGdkInput(), and clSoundProxy::SoundInThread(). |
|
||||||||||||
|
Get address of this end.
|
|
||||||||||||
|
Get address of remote end.
Definition at line 228 of file SockOp.cc. References iErrno, iRetVal, and iSockH. Referenced by clSoundSrvA::ServeClientThread(), clSoundSrv2::ServeClientThread(), clSoundProxy::ServeClientThread(), clComediSrv::ServeClientThread(), and clUIServer::Wait(). |
|
|
Set blocking/nonblocking IO.
|
|
|
Enable keepalive messages.
|
|
|
Enable linger option.
|
|
|
Get receive buffer size.
Definition at line 293 of file SockOp.cc. References iErrno, and iSockH. Referenced by clLofarDemon::MainLoop(). |
|
|
Set receive buffer size.
Definition at line 309 of file SockOp.cc. References iErrno, and iSockH. Referenced by clSubLocate::Main(), clLofarDemon::MainLoop(), clDirection3::ProcessLoop(), clDirection2::ProcessLoop(), and clSoundUI::SoundInThread(). |
|
|
Get send buffer size.
|
|
|
Set send buffer size.
Definition at line 337 of file SockOp.cc. References iErrno, and iSockH. Referenced by clDirection3::ProcessLoop(), clDirection2::ProcessLoop(), clSoundSrvA::ServeClientThread(), clSoundSrv2::ServeClientThread(), and clComediSrv::ServeClientThread(). |
|
|
Get position of receive buffer low-water sign.
|
|
|
Set receive buffer low-water sign.
|
|
|
Get position of send buffer low-water sign.
|
|
|
Set send buffer low-water sign.
|
|
|
Set receive timeout.
|
|
|
Set send timeout.
|
|
|
Set interval of TCP keepalive messages.
|
|
|
Disable TCP nagle-algorithm.
Definition at line 451 of file SockOp.cc. References iErrno, and iSockH. Referenced by clBeamAudio::clBeamAudio(), main(), clSoundSrvA::ServeClientThread(), clSoundSrv2::ServeClientThread(), clSoundProxy::ServeClientThread(), clFileSrv::ServeClientThread(), clComediSrv::ServeClientThread(), clBeamSrv2Master::ServeClientThread(), clBeamSrvMaster::ServeClientThread(), and clSoundProxy::SoundInThread(). |
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
|
|
Set type-of-service flag.
Definition at line 479 of file SockOp.cc. References iErrno, and iSockH. Referenced by main(), clSoundSrvA::ServeClientThread(), clSoundSrv2::ServeClientThread(), clSoundProxy::ServeClientThread(), clFileSrv::ServeClientThread(), clComediSrv::ServeClientThread(), clBeamSrv2Master::ServeClientThread(), clBeamSrvMaster::ServeClientThread(), and clSoundProxy::SoundInThread(). |
|
|
Close handle/connection in destructor.
Definition at line 491 of file SockOp.cc. References bCloseOnDestruct. Referenced by clUIServer::Wait(). |
|
|
Get handle (file descriptor).
Definition at line 287 of file SockOp.hh. References iSockH. Referenced by clGUILocate::OnConnectClick(), and clGUILevel::OnConnectClick(). |
|
|
Get errno.
Definition at line 293 of file SockOp.hh. References iErrno. Referenced by clStreamDist::AudioInThread(), clSaveSrv::ConnectStream(), clSpectGUI::GdkInput(), clDirection::GetFirstMsg(), clDirection::GetRequest(), clBeamSrv2Master::Main(), clBeamSrvMaster::Main(), clGUILofar::OnGdkInput(), clGUIDir::OnGdkInput(), clBeamAudioUI::OnGdkInput(), clSaveSrv::ProcessLoop(), clDirection::ReceiveData(), clLofarDemon::SendResults(), clDirection::SendResults(), clGUIDir::SendSettings(), clSoundProxy::ServeClientThread(), clBeamSrv2Master::ServeClientThread(), clBeamSrvMaster::ServeClientThread(), clSoundUI::SoundInThread(), clSoundProxy::SoundInThread(), and clBeamAudioUI::UpdateSettings(). |
|
|
Definition at line 41 of file SockOp.hh. Referenced by DisableNagle(), GetErrno(), GetPeerName(), GetRecvBufLowWater(), GetRecvBufSize(), GetSendBufLowWater(), GetSendBufSize(), GetSockName(), Read(), ReadN(), ReadSelect(), Receive(), ReceiveMsg(), Send(), SendMsg(), SetBlocking(), SetKeepAlive(), SetLinger(), SetNagle(), SetRecvBufLowWater(), SetRecvBufSize(), SetRecvTimeout(), SetSendBufLowWater(), SetSendBufSize(), SetSendTimeout(), SetTCPKeepAlive(), SetTypeOfService(), Shutdown(), Write(), WriteN(), and WriteSelect(). |
|
|
Definition at line 42 of file SockOp.hh. Referenced by GetPeerName(), GetSockName(), Read(), ReadN(), Receive(), ReceiveMsg(), Send(), SendMsg(), Shutdown(), Write(), and WriteN(). |
|
|
Definition at line 43 of file SockOp.hh. Referenced by Close(), clSockOp(), DisableNagle(), GetHandle(), GetPeerName(), GetRecvBufLowWater(), GetRecvBufSize(), GetSendBufLowWater(), GetSendBufSize(), GetSockName(), Read(), ReadN(), ReadSelect(), Receive(), ReceiveMsg(), Send(), SendMsg(), SetBlocking(), SetHandle(), SetKeepAlive(), SetLinger(), SetNagle(), SetRecvBufLowWater(), SetRecvBufSize(), SetRecvTimeout(), SetSendBufLowWater(), SetSendBufSize(), SetSendTimeout(), SetTCPKeepAlive(), SetTypeOfService(), Shutdown(), Write(), WriteN(), WriteSelect(), and ~clSockOp(). |
|
|
Definition at line 44 of file SockOp.hh. Referenced by clSockOp(), SetCloseOnDestruct(), and ~clSockOp(). |
1.3.3