void comm::ClientSocket::initialize()
-throw() {
+{
a_status = Status::None;
a_transport = NULL;
a_expectedSize = -1;
* porque ya está protegido por éste.
*/
void comm::ClientSocket::setfd(const int fd)
-throw(RuntimeException) {
+noexcept(false) {
Socket::a_fd = fd;
Socket::a_isBound = true;
activate(Status::Connected);
* invocar al metodo comm::Receiver::initialize.
*/
void comm::ClientSocket::setReceiver(comm::Receiver* receiver)
-throw(RuntimeException) {
+noexcept(false) {
if (a_receiver && Socket::a_receiverFactory)
Socket::a_receiverFactory->release(a_receiver);
// Protegido desde el Socket::close
void comm::ClientSocket::do_close()
-throw() {
+{
Socket::do_close();
if (a_transport != NULL) {
}
comm::Server* comm::ClientSocket::getServer()
-throw(RuntimeException) {
+noexcept(false) {
Guard guard(*this, "comm::ClientSocket (getServer)");
const INetAddress& remoteAddress = getRemoteAccessPoint().getINetAddress();
const Device* device = remoteAddress.getDevice(false);
// la conexión.
//_________________________________________________________________________________
void comm::ClientSocket::connect()
-throw(RuntimeException) {
+noexcept(false) {
Guard guard(*this, "comm::ClientSocket (connect)");
anna_socket_assert(isConnected() == true, "Already connected");
}
void comm::ClientSocket::send(comm::Message& message)
-throw(RuntimeException) {
+noexcept(false) {
Guard guard(*this, "comm::ClientSocket (send)");
do_write(getTransport()->code(message));
}
void comm::ClientSocket::send(comm::Message* message)
-throw(RuntimeException) {
+noexcept(false) {
if (message == NULL)
throw RuntimeException("comm::ClientSocket::send | Cannot send a NULL message", ANNA_FILE_LOCATION);
// su buffer, se cerrará.
//_______________________________________________________________________
void comm::ClientSocket::requestClose()
-throw() {
+{
Communicator* communicator = app::functions::component <Communicator> (ANNA_FILE_LOCATION);
a_status |= Status::ClosePending;
// Sólo tiene efecto real en modo ST
// Se invoca desde un entorno protegido, por lo que no hace falta SSCC.
//---------------------------------------------------------------------------------------
comm::Socket::Notify::_v comm::ClientSocket::receive()
-throw(RuntimeException) {
+noexcept(false) {
Notify::_v result;
if (a_reader.getMaxSize() == 0) {
}
comm::Socket::Notify::_v comm::ClientSocket::wait(const Millisecond &timeout, const bool _receive)
-throw(RuntimeException) {
+noexcept(false) {
Guard guard(*this, "comm::ClientSocket (wait)");
if (Socket::isOpened() == false) {
// la longitud esperada => prepara el a_data para recibir el siguiente bloque.
//---------------------------------------------------------------------------------------
const DataBlock* comm::ClientSocket::fetch()
-throw(RuntimeException) {
+noexcept(false) {
if (a_status & Status::ClosePending)
return NULL;
}
void comm::ClientSocket::calculeExpectedSize(const DataBlock& data)
-throw() {
+{
try {
if ((a_expectedSize = getTransport()->calculeSize(data)) != -1) {
LOGDEBUG(
}
comm::Transport* comm::ClientSocket::reserveTransport()
-throw(RuntimeException) {
+noexcept(false) {
if (a_transport == NULL) {
if (Socket::a_transportFactory == NULL) {
string msg(asString());
}
comm::Transport* comm::ClientSocket::unsafe_reserveTransport()
-throw(RuntimeException) {
+noexcept(false) {
if (a_transport == NULL) {
if (Socket::a_transportFactory == NULL) {
string msg(asString());
}
comm::Receiver* comm::ClientSocket::reserveReceiver()
-throw(RuntimeException) {
+noexcept(false) {
if (a_receiver == NULL && Socket::a_receiverFactory != NULL) {
Guard guard(this, "comm::ClientSocket::reserveReceiver");
// Este metodo se sobre-escribira en commsec::ClientSocket para establecer la conexion mediante las
// funciones SSH
int comm::ClientSocket::do_connect(const sockaddr* s, const int len)
-throw(RuntimeException) {
+noexcept(false) {
int r;
anna_signal_shield(r, ::connect(a_fd, s, len));
return r;
// problemas de interpretación en el extremo remoto.
//----------------------------------------------------------------------------------------------------
void comm::ClientSocket::do_write(const DataBlock& message)
-throw(RuntimeException) {
+noexcept(false) {
int size = message.getSize();
const char* data = message.getData();
int r(0);
// Devuelve 0 para indicar que el Socket se ha cerrado en el extremo remoto
//----------------------------------------------------------------------------
int comm::ClientSocket::do_read(const char* data, const int maxSize)
-throw(RuntimeException) {
+noexcept(false) {
int result;
do {
}
void comm::ClientSocket::forgot()
-throw() {
+{
if (a_transport != NULL)
a_transport->clear();
// (1) Recupera el tamano para verificar que se ha podido establecer la solicitud.
//--------------------------------------------------------------------------------------
void comm::ClientSocket::getSocketOptions()
-throw(RuntimeException) {
+noexcept(false) {
if ((a_rcvBufferSize = comm::Communicator::getReceivingChunkSize()) == -1) {
socklen_t l = sizeof(int);
int fd = Socket::getfd();
}
int comm::ClientSocket::getTotalPendingBytes() const
-throw() {
+{
// El nº de bytes pendientes de procesar será lo que queda en la cola I/O + los bytes que tenemos cargados en memoria
// los bytes pendientes se obtiene al leer el chunk
return a_pendingBytes.bytesToRead + getBufferSize();
string comm::ClientSocket::asString() const
-throw() {
+{
string msg("comm::ClientSocket { ");
msg += Socket::asString();
}
xml::Node* comm::ClientSocket::asXML(xml::Node* parent) const
-throw(RuntimeException) {
+noexcept(false) {
xml::Node* clientSocket = parent->createChild("comm.ClientSocket");
Socket::asXML(clientSocket);
}
string comm::ClientSocket::Status::asString(const int status)
-throw() {
+{
string result;
if (status == 0)