Update to version 3.2

This commit is contained in:
2026-03-18 14:56:42 +01:00
parent f593487c77
commit 44609d367f
49 changed files with 12657 additions and 3668 deletions

View File

@@ -22,14 +22,14 @@
#include <openssl/ssl.h>
#include <stdint.h>
#include <cstdint>
#include <streambuf>
#include <iostream>
#include <fstream>
namespace Gempa {
namespace CAPS {
class SC_GEMPA_CAPS_API Socket {
public:
typedef uint64_t count_t;
@@ -89,7 +89,8 @@ class SC_GEMPA_CAPS_API Socket {
Device::Status setNonBlocking(bool nb);
virtual Status connect(const std::string &hostname, uint16_t port);
virtual Status connect(const std::string &hostname, uint16_t port,
int timeout = 30);
count_t rx() const { return _bytesReceived; }
count_t tx() const { return _bytesSent; }
@@ -122,7 +123,7 @@ class SSLSocket : public Socket {
int write(const char *data, int len);
int read(char *data, int len);
Status connect(const std::string &hostname, uint16_t port);
Status connect(const std::string &hostname, uint16_t port, int timeout = 30);
virtual const unsigned char *sessionID() const;
virtual unsigned int sessionIDLength() const;
@@ -161,10 +162,6 @@ class socketbuf : public std::streambuf {
_sock = sock;
}
void settimeout(const struct timeval &tv) {
_timeout = tv;
}
void set_read_limit(int bytes) {
_allowed_reads = bytes;
@@ -257,15 +254,15 @@ class socketbuf : public std::streambuf {
}
private:
T *_sock;
timeval _timeout;
char _in[N];
char _out[N];
bool _block_write;
int _real_buffer_size;
int _allowed_reads;
T *_sock;
char _in[N];
char _out[N];
bool _block_write;
int _real_buffer_size;
int _allowed_reads;
};
}
}