/** \file
 *
 *  Contains the SocketServer class implementation.
 *
 *  Copyright (c) 2007,2008,2009 MBARI
 *  MBARI Proprietary Information.  All Rights Reserved
 */

#include "SocketServer.h"
#include "SocketException.h"

SocketServer::SocketServer( int port )
#ifndef __GAZEBO
throw( SocketException )
#endif
{
    // Any of these commands could throw an exception
    Socket::create();
    Socket::bind( port );
    Socket::listen();
}


void SocketServer::accept( SocketServer& sock )
#ifndef __GAZEBO
throw( SocketException )
#endif
{
    Socket::accept( sock );
}

void SocketServer::accept( SocketServer& sock, int timeoutMillis )
#ifndef __GAZEBO
throw( SocketException )
#endif
{
    Socket::accept( sock, timeoutMillis );
}
