Botan 1.10.17
tls_connection.h
Go to the documentation of this file.
1/*
2* TLS Connection
3* (C) 2004-2006 Jack Lloyd
4*
5* Released under the terms of the Botan license
6*/
7
8#ifndef BOTAN_TLS_CONNECTION_H__
9#define BOTAN_TLS_CONNECTION_H__
10
11#include <botan/x509cert.h>
12#include <vector>
13
14namespace Botan {
15
16/**
17* TLS Connection
18*/
19class BOTAN_DLL TLS_Connection
20 {
21 public:
22 virtual size_t read(byte[], size_t) = 0;
23 virtual void write(const byte[], size_t) = 0;
24 size_t read(byte& in) { return read(&in, 1); }
25 void write(byte out) { write(&out, 1); }
26
27 virtual std::vector<X509_Certificate> peer_cert_chain() const = 0;
28
29 virtual void close() = 0;
30
31 virtual ~TLS_Connection() {}
32 };
33
34}
35
36#endif
virtual size_t read(byte[], size_t)=0
virtual void close()=0
virtual void write(const byte[], size_t)=0
size_t read(byte &in)
virtual std::vector< X509_Certificate > peer_cert_chain() const =0