X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Fcomm%2FServerSocket.hpp;fp=include%2Fanna%2Fcomm%2FServerSocket.hpp;h=8369f9229efbc365a1fac7a149c0212d40873c2f;hp=9e50dc8e7993f00c0ae5caf6f6f6d76a61c0e3e0;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hpb=af9c86ffb0e28d35ad94d99c5f77e41578c972b4 diff --git a/include/anna/comm/ServerSocket.hpp b/include/anna/comm/ServerSocket.hpp index 9e50dc8..8369f92 100644 --- a/include/anna/comm/ServerSocket.hpp +++ b/include/anna/comm/ServerSocket.hpp @@ -89,13 +89,13 @@ public: \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. @@ -103,13 +103,13 @@ public: \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 @@ -122,13 +122,13 @@ public: \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 @@ -142,7 +142,7 @@ public: \warning Exclusivamente uso interno. */ - LocalConnection* accept() throw(RuntimeException); + LocalConnection* accept() noexcept(false); /** Libera los recursos del socket recibido como parametro. @@ -152,32 +152,32 @@ public: \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 @@ -191,27 +191,27 @@ public: \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::data(ii); } + static LocalConnection* localConnection(iterator& ii) { return Recycler::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: /** @@ -238,8 +238,8 @@ private: 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; };