-// ANNA - Anna is Not 'N' Anymore
-//
-// (c) Copyright 2005-2014 Eduardo Ramos Testillano & Francisco Ruiz Rayo
-//
-// https://bitbucket.org/testillano/anna
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: eduardo.ramos.testillano@gmail.com
-// cisco.tierra@gmail.com
+// ANNA - Anna is Not Nothingness Anymore //
+// //
+// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
+// //
+// See project site at http://redmine.teslayout.com/projects/anna-suite //
+// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
#ifndef anna_comm_ServerSocket_hpp
\return el numero de milisegundos esperado al hacer el bind compartido con este sockets
antes de considerar que no se puede atender peticiones en esa direccion.
*/
- const Millisecond &getBindDelay() throw() { return a_msBindDelay; }
+ const Millisecond &getBindDelay() { return a_msBindDelay; }
/**
Devuelve el socket asociado a este socket de bind compartido.
\return El socket asociado a este socket de bind compartido. Puede ser NULL.
*/
- BinderSocket* getBinderSocket() throw() { return a_binderSocket; }
+ BinderSocket* getBinderSocket() { return a_binderSocket; }
/**
Devuelve el modo de asociacion de este socket.
\warning El valor devuelto por este metodo solo sera valido despues de ejecutar correctamente
el metodo #bind
*/
- bool isSharedBind() const throw() { return a_sharedBind; }
+ bool isSharedBind() const { return a_sharedBind; }
/**
Establece el tamao de la cola de mensajes.
\param backlog Tamao de la cola de mensajes.
*/
- void setBacklog(const int backlog) throw() { a_backlog = backlog; }
+ void setBacklog(const int backlog) { a_backlog = backlog; }
/**
Establece el numero de milisegundos esperado al hacer el bind con este sockets antes
\warning Solo tendra efecto en el caso de que el socket tenga activado el modo de 'Bind compartido'.
*/
- void setBindDelay(const Millisecond &bindDelay) throw() { a_msBindDelay = bindDelay; }
+ void setBindDelay(const Millisecond &bindDelay) { a_msBindDelay = bindDelay; }
/**
Metodo que debemos invocar una vez que el ServerSocket esta establecido.
\warning Normalmente se invocar�desde Communicator::attach(ServerSocket&,bool)
*/
- virtual void prepare() throw(RuntimeException);
+ virtual void prepare() noexcept(false);
/**
Comprueba la conexion establecida y acepta las peticiones. Esta funcin puede bloquear al thread
\warning Exclusivamente uso interno.
*/
- LocalConnection* accept() throw(RuntimeException);
+ LocalConnection* accept() noexcept(false);
/**
Libera los recursos del socket recibido como parametro.
\warning Exclusivamente uso interno.
*/
- void release(LocalConnection* localConnection) throw(RuntimeException);
+ void release(LocalConnection* localConnection) noexcept(false);
/**
Devuelve un iterador al primer LocalConnection definido.
\return un iterador al primer LocalConnection definido.
*/
- iterator begin() throw() { return a_localConnections.begin(); }
+ iterator begin() { return a_localConnections.begin(); }
/**
Devuelve un iterador al ultimo LocalConnection definido.
\return un iterador al ultimo LocalConnection definido.
*/
- iterator end() throw() { return a_localConnections.end(); }
+ iterator end() { return a_localConnections.end(); }
/**
Devuelve una cadena con la informacion referente a este socket.
@return Una cadena con la informacion referente a este socket.
*/
- virtual std::string asString() const throw();
+ virtual std::string asString() const ;
/**
Devuelve un nodo XML con la informacion referente a este objeto.
\param parent Nodo XML a partir del cual introducir la informacion.
\return Un nodo XML con la informacion referente a este objeto.
*/
- virtual xml::Node* asXML(xml::Node* parent) const throw(RuntimeException);
+ virtual xml::Node* asXML(xml::Node* parent) const noexcept(false);
/**
Metodo manejador de evento que permite ajustar el funcionamiento cuando el nucleo de
\return \em true si la conexion es acceptada a \em false en otro caso, en cuyo caso se liberaran
automaticamente todos los recursos asociados a la peticion de conexion.
*/
- virtual bool eventAcceptConnection(const ClientSocket &clientSocket) throw(RuntimeException) { return true; }
+ virtual bool eventAcceptConnection(const ClientSocket &clientSocket) noexcept(false) { return true; }
// /**
// Informa sobre la rotura de una conexion que se creo a partir de un ServerSocket
//
// @param localConnection Socket que se acepto sobre el server socket y que se ha roto.
// */
-// virtual void eventBreakLocalConnection (LocalConnection* localConnection) throw (RuntimeException) {;}
+// virtual void eventBreakLocalConnection (LocalConnection* localConnection) noexcept(false) {;}
/**
Devuelve una referencia al contenido apuntado por el iterador.
\return una referencia al contenido apuntado por el iterador.
*/
- static LocalConnection* localConnection(iterator& ii) throw() { return Recycler<LocalConnection>::data(ii); }
+ static LocalConnection* localConnection(iterator& ii) { return Recycler<LocalConnection>::data(ii); }
/**
Devuelve el nombre logico de esta clase.
\return el nombre logico de esta clase.
*/
- static const char* className() throw() { return "anna::comm::ServerSocket"; }
+ static const char* className() { return "anna::comm::ServerSocket"; }
protected:
/**
BinderSocket* a_binderSocket;
Millisecond a_msBindDelay;
- virtual ClientSocket* allocateClientSocket() const throw();
- int do_bind(const struct sockaddr *, const int len) throw(RuntimeException);
+ virtual ClientSocket* allocateClientSocket() const ;
+ int do_bind(const struct sockaddr *, const int len) noexcept(false);
friend class BinderSocket;
};