catalinux / Conn (public) (License: LGPLv2) (since 2016-03-01) (hash sha1)
Net library for easy building ipv4/ipv6 network daemons/clients
List of commits:
Subject Hash Author Date (UTC)
Converted #defines to enums. 6bafbb8f6887be62ccc668411b3e336d732c82dc Catalin(ux) M. BOIE 2009-08-20 15:20:38
Let *_move_slot functions return an error code (useless right now). 353a5edd7b350383ee79cb5d8536568fb733445b Catalin(ux) M. BOIE 2009-08-20 15:19:24
Fixed the case when all connection are closed (app didn't exit). 79d111839a75354c60a675a5c7ff328a38d4b8c8 Catalin(ux) M. BOIE 2009-06-22 14:50:59
Bump up the version to 1.0.21. 574437c47f27ead82d5a891be30312c6725d5142 Catalin(ux) M. BOIE 2009-05-20 14:29:02
Fixed a use of an uninit variable! Oops! 381473f2077d895d5064f1ea2e82d5a215ad5770 Catalin(ux) M. BOIE 2009-05-20 14:28:24
Bump up the version to 1.0.20. 2270d4d69a1479a68c61c908bb2e421984f2d785 Catalin(ux) M. BOIE 2009-05-20 14:10:52
Fixed an underflow in Conn_rtrim. Oops! dd361465e5f31adcc337b4eca9ebeec6c1713c42 Catalin(ux) M. BOIE 2009-05-20 14:10:28
Missed a '('. Oops! 920f9fda5fecd14e1cfcdb8bd66164f3bd215b93 Catalin(ux) M. BOIE 2009-05-20 14:05:59
Try harder to respect the trigger interval; in the start fire after interval. e7e5a52e7a6b7ad59da38bf660269e025f10ade4 Catalin(ux) M. BOIE 2009-05-06 11:19:09
Bump up the version. e3723ad356330457959f6d9100be81d7eaacc57d Catalin(ux) M. BOIE 2009-04-17 14:33:30
Added reconnect executable to .gitignore. 585adaa455a4ab751733bd872faf10c97a880d17 Catalin(ux) M. BOIE 2009-04-17 14:33:06
Made the server example (s.c) nicer and did more error checking. 519cf83b2d28bee0d3bb25bbc962b3ef5677ee92 Catalin(ux) M. BOIE 2009-04-17 14:32:07
Added a reconnect example. 59b8156a8c5d17c90b5b064b1e1043b365ddac0a Catalin(ux) M. BOIE 2009-04-17 14:31:47
Show a nicer value if the reconnect feat was never used. f51cf254286f76721e517eb69aa00695bdb3b2f5 Catalin(ux) M. BOIE 2009-04-17 14:30:59
Reget the time, even if no events. Else, the expiration will not work. a1167cc19d739d62d6a21fd238c701c60a64cf6d Catalin(ux) M. BOIE 2009-04-17 14:12:57
Be more verbose and show also the flags. 377f288df5d1fbde5c14276e8256fb88216d8761 Catalin(ux) M. BOIE 2009-04-17 13:01:59
Changed split test to show that we can get past 4096 limit. 8ae8fefc1f2d19dbc893a95818ecadcc5c3014e0 Catalin(ux) M. BOIE 2009-04-17 12:46:03
Improved Conn_split (and remove the limitation to 4096 'right' value. ec46e3c94da65fe94ed109727fd3dcb50384a44e Catalin(ux) M. BOIE 2009-04-17 12:31:53
Removed an unsused variable. 1fa664bac9482c6e053bb3ea1d06280b66dadfed Catalin(ux) M. BOIE 2009-04-17 12:04:46
Simplified expand_buf and also fixed an out-of-bounds wrinting. a2a507f235f7847277c2a485af8efb8efaa1ffa7 Catalin(ux) M. BOIE 2009-04-17 12:03:34
Commit 6bafbb8f6887be62ccc668411b3e336d732c82dc - Converted #defines to enums.
Signed-off-by: Catalin(ux) M. BOIE <catab@embedromix.ro>
Author: Catalin(ux) M. BOIE
Author date (UTC): 2009-08-20 15:20
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2009-09-02 15:42
Parent(s): 353a5edd7b350383ee79cb5d8536568fb733445b
Signer:
Signing key:
Signing status: N
Tree: db3617d357eaeb82d508384d33a43bd8b4fc40e1
File Lines added Lines deleted
Conn_engine_core.h 54 46
File Conn_engine_core.h changed (mode: 100644) (index 22ae8e8..743f899)
34 34
35 35
36 36 /* state */ /* state */
37 #define CONN_STATE_START 0
38 #define CONN_STATE_FREE CONN_STATE_START + 1
39 #define CONN_STATE_EMPTY CONN_STATE_START + 2
40 #define CONN_STATE_OPEN CONN_STATE_START + 3
41 #define CONN_STATE_LISTEN CONN_STATE_START + 4
42 #define CONN_STATE_CONNECT_0 CONN_STATE_START + 5
43 #define CONN_STATE_CONNECT_a CONN_STATE_START + 6
44 #define CONN_STATE_CONNECT_b CONN_STATE_START + 7
45
37 enum {
38 CONN_STATE_FREE,
39 CONN_STATE_EMPTY,
40 CONN_STATE_OPEN,
41 CONN_STATE_LISTEN,
42 CONN_STATE_CONNECT_0,
43 CONN_STATE_CONNECT_a,
44 CONN_STATE_CONNECT_b,
45 CONN_STATE_ERROR
46 };
46 47
47 48 /* error kind */ /* error kind */
48 #define CONN_ERROR_START 0
49 #define CONN_ERROR_USERREQ CONN_ERROR_START + 1 /* user requested the close */
50 #define CONN_ERROR_POLL CONN_ERROR_START + 2
51 #define CONN_ERROR_RECV CONN_ERROR_START + 3
52 #define CONN_ERROR_SEND CONN_ERROR_START + 4
53 #define CONN_ERROR_SOCKET CONN_ERROR_START + 5
54 #define CONN_ERROR_HANGUP CONN_ERROR_START + 6
55 #define CONN_ERROR_GETADDRINFO CONN_ERROR_START + 7
56 #define CONN_ERROR_EXPIRED CONN_ERROR_START + 8
57 #define CONN_ERROR_ACCEPT CONN_ERROR_START + 9 /* This is free TODO: check! */
58 #define CONN_ERROR_MEM CONN_ERROR_START + 10
59 #define CONN_ERROR_CONNECT CONN_ERROR_START + 11
60 #define CONN_ERROR_READ_TIMEOUT CONN_ERROR_START + 12
61 #define CONN_ERROR_CONN_TIMEOUT CONN_ERROR_START + 13
62
49 enum {
50 CONN_ERROR_NO_ERROR,
51 CONN_ERROR_USERREQ, /* user requested the close */
52 CONN_ERROR_POLL,
53 CONN_ERROR_RECV,
54 CONN_ERROR_SEND,
55 CONN_ERROR_SOCKET,
56 CONN_ERROR_HANGUP,
57 CONN_ERROR_GETADDRINFO,
58 CONN_ERROR_EXPIRED,
59 CONN_ERROR_ACCEPT, /* This is free TODO: check! */
60 CONN_ERROR_MEM,
61 CONN_ERROR_CONNECT,
62 CONN_ERROR_READ_TIMEOUT,
63 CONN_ERROR_CONN_TIMEOUT,
64 CONN_ERROR_INTERNAL
65 };
63 66
64 67 /* FLAGS */ /* FLAGS */
65 68 #define CONN_FLAGS_AUTO_RECONNECT 0x01 << 0 #define CONN_FLAGS_AUTO_RECONNECT 0x01 << 0
66 69 #define CONN_FLAGS_CLOSE_AFTER_SEND 0x01 << 1 #define CONN_FLAGS_CLOSE_AFTER_SEND 0x01 << 1
67 70
68
69 71 /* Parameters */ /* Parameters */
70 #define CONN_PARA_START 0
71 #define CONN_PARA_AUTO_RECONNECT CONN_PARA_START + 1
72 #define CONN_PARA_RECONNECT_DELAY CONN_PARA_START + 2
73 #define CONN_PARA_IDLE_TIME CONN_PARA_START + 3
74 #define CONN_PARA_READ_TIMEOUT CONN_PARA_START + 4
75 #define CONN_PARA_CONN_TIMEOUT CONN_PARA_START + 5
76 #define CONN_PARA_TRIGGER CONN_PARA_START + 6
77 #define CONN_PARA_IBUF CONN_PARA_START + 7
78 #define CONN_PARA_OBUF CONN_PARA_START + 8
72 enum {
73 CONN_PARA_START,
74 CONN_PARA_AUTO_RECONNECT,
75 CONN_PARA_RECONNECT_DELAY,
76 CONN_PARA_IDLE_TIME,
77 CONN_PARA_READ_TIMEOUT,
78 CONN_PARA_CONN_TIMEOUT,
79 CONN_PARA_TRIGGER,
80 CONN_PARA_IBUF,
81 CONN_PARA_OBUF
82 };
79 83
80 84 /* Callbacks */ /* Callbacks */
81 #define CONN_CB_START 0
82 #define CONN_CB_ACCEPT CONN_CB_START + 1
83 #define CONN_CB_RECV CONN_CB_START + 2
84 #define CONN_CB_SEND CONN_CB_START + 3
85 #define CONN_CB_DATA CONN_CB_START + 4
86 #define CONN_CB_CLOSE CONN_CB_START + 5
87 #define CONN_CB_TRIGGER CONN_CB_START + 6
88 #define CONN_CB_ERROR CONN_CB_START + 7
89 #define CONN_CB_CONNECTED CONN_CB_START + 8
90 #define CONN_CB_ACCEPT_ERROR CONN_CB_START + 9
85 enum {
86 CONN_CB_START,
87 CONN_CB_ACCEPT,
88 CONN_CB_RECV,
89 CONN_CB_SEND,
90 CONN_CB_DATA,
91 CONN_CB_CLOSE,
92 CONN_CB_TRIGGER,
93 CONN_CB_ERROR,
94 CONN_CB_CONNECTED,
95 CONN_CB_ACCEPT_ERROR
96 };
91 97
92 98 /* Engine type */ /* Engine type */
93 #define CONN_ENGINE_POLL 1
94 #define CONN_ENGINE_EPOLL 2
99 enum {
100 CONN_ENGINE_POLL,
101 CONN_ENGINE_EPOLL
102 };
95 103
96 104 extern unsigned int CONN_POLLIN; extern unsigned int CONN_POLLIN;
97 105 extern unsigned int CONN_POLLOUT; extern unsigned int CONN_POLLOUT;
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/Conn

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/Conn

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/Conn

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main