Welcome to mirror list, hosted at ThFree Co, Russian Federation.

XrdpStream.cpp - github.com/neutrinolabs/ulalaca-xrdp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2da6d08b7795d0072a6c15834cd5ebe1c73a7f7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// Created by Gyuhwan Park on 2022/04/30.
//

#if defined(HAVE_CONFIG_H)
#include <config_ac.h>
#endif

#include "ulalaca.hpp"

static inline XrdpStream::Stream *createXrdpStreamInternal(size_t size) {
    XrdpStream::Stream *stream;
    make_stream(stream);
    init_stream(stream, size);
    
    return stream;
}

static void XrdpStreamDeleter(XrdpStream::Stream *stream) {
    free_stream(stream);
}

XrdpStream::XrdpStream(size_t size):
    _stream { createXrdpStreamInternal(size), XrdpStreamDeleter }
{

}

XrdpStream::operator Stream const *() const {
    return _stream.get();
}