taskrambler  v0.1.8
Web server and task management solution.
stream.c File Reference
#include <stdarg.h>
#include <openssl/ssl.h>
#include "class.h"
#include "stream/stream.h"
+ Include dependency graph for stream.c:

Go to the source code of this file.

Functions

static int streamCtor (void *_this, va_list *params)
 
static void streamDtor (void *_this)
 
 INIT_IFACE (Class, streamCtor, streamDtor, NULL)
 
 CREATE_CLASS (Stream, NULL, IFACE(Class))
 

Detailed Description

Author
Georg Hopp

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file stream.c.

Function Documentation

CREATE_CLASS ( Stream  ,
NULL  ,
IFACE(Class)   
)
INIT_IFACE ( Class  ,
streamCtor  ,
streamDtor  ,
NULL   
)
static int streamCtor ( void *  _this,
va_list *  params 
)
static

Definition at line 32 of file stream.c.

References STREAM_FD, and STREAM_SSL.

33 {
34  Stream this = _this;
35  this->type = va_arg(* params, StreamHandleType);
36 
37  switch(this->type) {
38  case STREAM_FD:
39  (this->handle).fd = va_arg(* params, int);
40  break;
41 
42  case STREAM_SSL:
43  (this->handle).ssl = va_arg(* params, SSL*);
44  break;
45 
46  default:
47  return -1;
48  }
49 
50  return 0;
51 }
StreamHandleType
Definition: stream/stream.h:31
static void streamDtor ( void *  _this)
static

Definition at line 55 of file stream.c.

56 {
57 }