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)
Added queue stuff - not used for now. b913455733a88e63bea980e7490d4f36766e15fc Catalin(ux) M. BOIE 2009-02-26 10:50:56
Constify a lot of parameters and added more consistent logging. 8b15034895c7e63be9b9ca68e4b41c9a52618d10 Catalin(ux) M. BOIE 2009-02-26 10:46:05
Stuff in/out. 074bc88cec80384ade2f4309840a7d2c6f15a700 Catalin(ux) M. BOIE 2009-02-26 10:41:16
Remove 'slot' concept from anywhere I could. It was confusing. eacc7a0b5355ffa8f71dc07631209e2f805edd03 Catalin(ux) M. BOIE 2009-02-23 15:21:53
Use valgrind in examples to catch errors. 3520092ef3e946840bc13fd1891b22645cf085a5 Catalin(ux) M. BOIE 2009-02-23 15:21:23
Some cosmetic changes for examples. 2fc9e92d9fb24568a13355db191e5bf64d601ee8 Catalin(ux) M. BOIE 2009-02-23 15:21:02
More TODO entries added/removed. eb5a15672c8adf3c3da2425582b1e842c6127b13 Catalin(ux) M. BOIE 2009-02-23 15:20:04
Minor cosmetic changes. 5955b574710254e771bbf9d81a8712033c9f1464 Catalin(ux) M. BOIE 2009-02-23 11:32:20
Added support for multiple polling engines and added epoll engine. ecf8b9c40ddae857b9d7dd72dee6596c1689db3e Catalin(ux) M. BOIE 2009-02-23 10:02:39
Duilder updates. db4999d6737f84d17c3b9aa5863483c91d6ed1a7 Catalin(ux) M. BOIE 2008-12-08 14:17:02
Bump up the version to 1.0.11. c623ba1f66e79d758d88407b6224c3574d9fd730 Catalin(ux) M. BOIE 2008-07-16 06:38:33
Added Conn_for_every_line. e7b9ae7009aa9a5cafa1f0f4e3916729f69dbb6b Catalin(ux) M. BOIE 2008-07-15 14:38:29
Bump version to 1.0.10. 4919629756fe6236e2ff75e646e612ed534353e8 Catalin(ux) M. BOIE 2008-07-04 09:23:00
Updated duilder. a20257fddc85103b43978c64d9cd4a5d4c1451ea Catalin(ux) M. BOIE 2008-07-04 09:14:18
Added SRPM_POST_RUN duilder config variable. f7c007d745d147f285ad8bc0a9bdfea3a7d832c0 Catalin(ux) M. BOIE 2008-07-04 09:13:47
Changed my e-mail address and URL. 9353a5fd0cad934232e41b23ee10872f33df2da1 Catalin(ux) M. BOIE 2008-07-04 09:13:10
Updated .gitignore. c40b1c4bf37a2b43804e39444571110eb79be466 Catalin(ux) M. BOIE 2008-07-04 09:07:56
Added .gitignore for examples directory. fc20d411e784066c30e3abe3d77989168fca1ee9 Catalin(ux) M. BOIE 2008-07-04 09:07:33
Added Conn_get_line. 5916ac4c9544d242a21ac50178efae893dff4806 Catalin(ux) M. BOIE 2008-07-04 08:59:27
Prepared to use duilder (my custom builder). 058d181795e64c0d1a82d587e7b1d858b7af87b2 Catalin(ux) M. BOIE 2008-03-21 13:37:19
Commit b913455733a88e63bea980e7490d4f36766e15fc - Added queue stuff - not used for now.
Signed-off-by: Catalin(ux) M. BOIE <catab@embedromix.ro>
Author: Catalin(ux) M. BOIE
Author date (UTC): 2009-02-26 10:50
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2009-03-05 15:31
Parent(s): 8b15034895c7e63be9b9ca68e4b41c9a52618d10
Signing key:
Tree: d8166a45ac87a7134e2044a77d892f7fcca3e78d
File Lines added Lines deleted
Conn.c 4 0
Conn_engine_core.c 53 0
Conn_engine_core.h 18 0
File Conn.c changed (mode: 100644) (index 05261cd..eca8f5b)
... ... int Conn_init(const unsigned int max)
123 123
124 124 snprintf(Conn_error, sizeof(Conn_error), "%s", ""); snprintf(Conn_error, sizeof(Conn_error), "%s", "");
125 125
126 /*
127 Conn_queue_init(&Conn_queue_free);
128 */
129
126 130 #ifdef POLL_FOUND #ifdef POLL_FOUND
127 131 engine = CONN_ENGINE_POLL; engine = CONN_ENGINE_POLL;
128 132 Conn_engine_poll_found = 1; Conn_engine_poll_found = 1;
File Conn_engine_core.c changed (mode: 100644) (index a3891b4..5f5c3c1)
... ... unsigned int CONN_POLLNVAL;
63 63 unsigned int CONN_POLLRDNORM; unsigned int CONN_POLLRDNORM;
64 64 unsigned int CONN_POLLRDBAND; unsigned int CONN_POLLRDBAND;
65 65
66 /* queues */
67 struct Conn_queue Conn_queue_free;
68
66 69
67 70 /* Functions */ /* Functions */
68 71
 
... ... void Conn_set(struct Conn *C, const unsigned int var, const int val)
863 866 break; break;
864 867 } }
865 868 } }
869
870 /*
871 * Init a queue
872 */
873 void Conn_queue_init(struct Conn_queue *q)
874 {
875 q->head = q->tail = NULL;
876 }
877
878 /*
879 * Add a slot in a queue
880 */
881 int Conn_queue_add(struct Conn_queue *q, const unsigned int slot)
882 {
883 struct Conn_queue_entry *p;
884
885 p = (struct Conn_queue_entry *) calloc(1, sizeof(struct Conn_queue_entry));
886 if (!p)
887 return -1;
888
889 p->slot = slot;
890 p->next = NULL;
891
892 if (q->head == NULL) {
893 q->head = p;
894 } else {
895 q->tail->next = p;
896 }
897
898 q->tail = p;
899
900 return 0;
901 }
902
903 /*
904 * Destroys a queue
905 */
906 void Conn_queue_destroy(struct Conn_queue *q)
907 {
908 struct Conn_queue_entry *p, *next;
909
910 p = q->head;
911 while (p) {
912 next = p->next;
913 free(p);
914 p = next;
915 }
916
917 q->head = q->tail = NULL;
918 }
File Conn_engine_core.h changed (mode: 100644) (index 6923c78..e686ef5)
... ... struct Conn
166 166 void (*cb_trigger)(struct Conn *C); void (*cb_trigger)(struct Conn *C);
167 167 void (*cb_error)(struct Conn *C); void (*cb_error)(struct Conn *C);
168 168 void (*cb_connected)(struct Conn *C); void (*cb_connected)(struct Conn *C);
169 void (*cb_accept_error)(struct Conn *C);
169 170 }; };
170 171
172 struct Conn_queue_entry
173 {
174 unsigned int slot;
175 struct Conn_queue_entry *next;
176 };
171 177
178 struct Conn_queue
179 {
180 struct Conn_queue_entry *head, *tail;
181 };
172 182
173 183 /* Variables */ /* Variables */
174 184 extern void (*Conn_accept_cb)(struct Conn *C); extern void (*Conn_accept_cb)(struct Conn *C);
 
... ... extern char Conn_error[512];
212 222 extern FILE *Conn_Log; extern FILE *Conn_Log;
213 223 extern int debug_band; extern int debug_band;
214 224
225 /* queues */
226 extern struct Conn_queue Conn_queue_free;
215 227
216 228 /* Functions */ /* Functions */
217 229 extern char *Conn_strerror(void); extern char *Conn_strerror(void);
 
... ... extern char *Conn_obuf(const struct Conn *C);
263 275 extern char *Conn_domain(const struct Conn *C); extern char *Conn_domain(const struct Conn *C);
264 276 extern char *Conn_type(const struct Conn *C); extern char *Conn_type(const struct Conn *C);
265 277
278 /* queue stuff */
279 extern void Conn_queue_init(struct Conn_queue *q);
280 extern int Conn_queue_add(struct Conn_queue *q,
281 const unsigned int slot);
282 extern void Conn_queue_destroy(struct Conn_queue *q);
283
266 284 #endif #endif
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