Faspstream Manager C/C++ API  3.6.1
A C and C++ language interface to basic streaming over the fasp protocol
FaspConnectionChannel.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * Aspera, Inc.
4  *
5  * C++ only.
6  *
7  * This is the C++ interface you must implement for sharing a TCP connection
8  * with faspstream for tunneling fasp control data (out-of-band feature).
9  *
10  * You then pass your implementation as an argument to the FaspStreamClient
11  * or FaspStreamServer constructors.
12  */
13 #include <exception>
14 
15 #ifdef WIN32
16 
17 #ifdef FASPSTREAM_CPP_EXPORTS
18 #define FASPSTREAM_CPP_API __declspec(dllexport)
19 #else
20 #define FASPSTREAM_CPP_API __declspec(dllimport)
21 #endif
22 
23 #else // NOT WIN32
24 #define FASPSTREAM_CPP_API
25 #endif
26 
34 {
35 public:
53  virtual int read(char* buff, size_t bytes) = 0;
65  virtual int write(const char* data, size_t bytes) = 0;
71  virtual void close() = 0;
72 };
73 
77 class FaspChannelTimeoutException : public std::exception
78 {
79 };
80 
85 class FaspChannelClosedException : public std::exception
86 {
87 };
88 
Definition: FaspConnectionChannel.h:85
Definition: FaspConnectionChannel.h:33
Definition: FaspConnectionChannel.h:77
virtual int read(char *buff, size_t bytes)=0
virtual void close()=0
virtual int write(const char *data, size_t bytes)=0