Commit 49a69077 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Style

parent 92aeda93
......@@ -76,7 +76,7 @@ public:
#endif
}
};
inline ~CConnectionAccepter()
{
delete m_pServer;
......@@ -487,15 +487,18 @@ void CVANetServerImpl::Reset()
/** @todo: reset core? */
}
std::string CVANetServerImpl::GetServerAdress() const {
std::string CVANetServerImpl::GetServerAdress() const
{
return m_sServerIP;
}
int CVANetServerImpl::GetServerPort() const {
int CVANetServerImpl::GetServerPort() const
{
return m_iServerPort;
}
IVACore* CVANetServerImpl::GetCoreInstance() const {
IVACore* CVANetServerImpl::GetCoreInstance() const
{
return m_pRealCore;
}
......@@ -519,21 +522,26 @@ void CVANetServerImpl::SetCoreInstance( IVACore* pCore ) {
// m_bRunning = bActive;
//}
bool CVANetServerImpl::IsClientConnected() const {
bool CVANetServerImpl::IsClientConnected() const
{
return ( m_vecClients.empty() == false );
}
int CVANetServerImpl::GetNumConnectedClients() const {
int CVANetServerImpl::GetNumConnectedClients() const
{
return ( int ) m_vecClients.size();
}
std::string CVANetServerImpl::GetClientHostname( const int iClientIndex ) const {
std::string CVANetServerImpl::GetClientHostname( const int iClientIndex ) const
{
VistaMutexLock oLock( *m_pServerChangeLock );
if( iClientIndex < 0 || iClientIndex >( int )m_vecClients.size() )
return "";
return m_vecClients[ iClientIndex ].m_sHost;
}
bool CVANetServerImpl::AttachEventHandler( IEventHandler* pHandler ) {
bool CVANetServerImpl::AttachEventHandler( IEventHandler* pHandler )
{
VistaMutexLock oLock( *m_pEventChannelLock );
std::list<IEventHandler*>::iterator itEntry = std::find( m_liEventHandlers.begin(),
m_liEventHandlers.end(), pHandler );
......@@ -542,7 +550,8 @@ bool CVANetServerImpl::AttachEventHandler( IEventHandler* pHandler ) {
m_liEventHandlers.push_back( pHandler );
return true;
}
bool CVANetServerImpl::DetachEventHandler( IEventHandler* pHandler ) {
bool CVANetServerImpl::DetachEventHandler( IEventHandler* pHandler )
{
VistaMutexLock oLock( *m_pEventChannelLock );
std::list<IEventHandler*>::iterator itEntry = std::find( m_liEventHandlers.begin(),
m_liEventHandlers.end(), pHandler );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment