Commit 8180119937fa9305ad419b8fa5045ca72cc8e067

Authored by Georg Hopp
1 parent 0acadc53

add connector

1 1 nobase_include_HEADERS = trcomm.h \
2 2 tr/comm_end_point.h \
3 3 tr/connection.h \
  4 + tr/connector.h \
4 5 tr/protocol.h \
5 6 tr/proto_message.h \
6 7 tr/protocol/raw.h \
... ...
... ... @@ -3,6 +3,7 @@
3 3
4 4 #include "tr/comm_end_point.h"
5 5 #include "tr/connection.h"
  6 +#include "tr/connector.h"
6 7 #include "tr/protocol.h"
7 8 #include "tr/proto_message.h"
8 9 #include "tr/protocol/raw.h"
... ...
... ... @@ -5,6 +5,7 @@ AM_CFLAGS += -I../include/
5 5
6 6 TRCOMM = comm_end_point.c \
7 7 connection.c \
  8 + connector.c \
8 9 protocol.c \
9 10 proto_message.c \
10 11 protocol_raw.c \
... ...
... ... @@ -29,6 +29,7 @@
29 29 #include "trio.h"
30 30
31 31 #include "tr/comm_end_point.h"
  32 +#include "tr/protocol.h"
32 33 #include "tr/interface/comm_end_point.h"
33 34
34 35 static
... ... @@ -38,7 +39,7 @@ commEndPointCtor(void * _this, va_list * params)
38 39 TR_CommEndPoint this = _this;
39 40
40 41 this->transport = va_arg(*params, TR_Socket);
41   - this->protocol = va_arg(*params, void *);
  42 + this->protocol = va_arg(*params, TR_Protocol);
42 43 this->read_chunk_size = va_arg(*params, int);
43 44 this->do_close = 0;
44 45 this->read_buffer = TR_new(TR_Queue);
... ...
... ... @@ -52,6 +52,7 @@ connectionDtor(void * _this)
52 52 TR_Connection this = _this;
53 53
54 54 TR_delete(this->current_message);
  55 + TR_PARENTCALL(_this, TR_Class, dtor);
55 56 }
56 57
57 58 static
... ...
Please register or login to post a comment