0

I have implemented server for file transfering between two clients in asio lib and it works when I'm using asio::ip::tcp::socket but when I switched to asio::ssl::streamasio::ip::tcp::socket and using SSL I noticed that server returns "decryption failed or bad record mac (SSL routines)" error when reading socket when: clientA sends file to clientB and clientB sends file to clientA at the same time. (asynchronous read and writes on one socket)

Is there some option I should set to use SSL in asio in full-duplex mode or is it not possible ?

sehe
  • 374,641
  • 47
  • 450
  • 633
0x90h
  • 21
  • 3
  • Should work, so the problem is likely your (unknown) code. – Steffen Ullrich Nov 07 '22 at 13:45
  • You are wrong. In client I had separate thread for writing socket and other for reading which was cause of error because this two actions was not synchronized. If you use mutexes, strands or other synchronization prmitives to forbid concurrent access to read and write operation on single socket it means it is not full-duplex anymore because then you can't speak and hear at the same time – 0x90h Nov 10 '22 at 12:42

0 Answers0