Pong

June 14th 2014, Error Handling (Revisited)

June 13th 2014 Client GUI | | June 15th 2014 Transmission Meta Data

Handle errors gracefully that occur during transmission. Errors are reported as error() signals of the QSslSocket.

  1. For the blocking client we connect to the error() signal and throw an exception that is catched while the client is waiting in the transmit() method for the socket to disconnect. As consequence we return a false boolean value that indicates that the transmission did not succeed.
  2. For the non-blocking server we connect to the error() signal and create a signal that carries the type of the encountered error. If the transmission succeeded we emit a transmitted() signal that carries the received data.


June 13th 2014 Client GUI | | June 15th 2014 Transmission Meta Data

Options: