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 Conn_lifetime (returns the time in ms between connected state and now). 4e3f1aaabc21d4cbdac26e42612ebd0298c8d86e Catalin(ux) M. BOIE 2009-08-31 17:22:37
Added Conn_sys that logs some system variables related to network perf. af960f317b8ca9a8f78fe44e80ddbdb6a9483e6f Catalin(ux) M. BOIE 2009-08-31 16:36:00
Better output flags. d57a98c2b158aeb30530c2e5188977a40336a360 Catalin(ux) M. BOIE 2009-08-25 20:37:55
Improved examples. 75439293c1d067327e606d72ec6290b43110bf24 Catalin(ux) M. BOIE 2009-08-25 20:37:29
Removed line1.c because duplicates code. 1119059afacde8d0b7b7dab77850dd6b71684190 Catalin(ux) M. BOIE 2009-08-25 20:11:52
Removed *.run becasue we have a generic run script. 007083cd9d1abefe4dd73e65c9026a2607fbcd4e Catalin(ux) M. BOIE 2009-08-25 20:09:00
Removed bind_s example because blackhole_s will take place. b9b06d98f00413b5a5df9d7bc9b3bd05b5536f28 Catalin(ux) M. BOIE 2009-08-25 20:07:38
Added Conn_set_address helper. 1b6e7e8a294ac88aa966e4e43bb77a4fdff0ca5a Catalin(ux) M. BOIE 2009-08-25 19:21:00
Fixed storing of local address (do not overwrite remote address). d431edba6699d1363e4d616aa6f96588272188b0 Catalin(ux) M. BOIE 2009-08-25 18:37:55
Added Conn_stop to eleganly stop Conn system. 4ca191771c5c119e9755a5af3158fabe43ddf5f2 Catalin(ux) M. BOIE 2009-08-25 18:30:32
Replaced Conn_protocol with Conn_get_socket_protocol. a1cbc5c612d82e6d1341524c67fe249648c81806 Catalin(ux) M. BOIE 2009-08-25 18:16:45
Compressed a little the POLL flags. 47b5dce395694c18c973e3ce6ba9a71c690a41bc Catalin(ux) M. BOIE 2009-08-25 18:16:16
Store also local address for incoming connections. 0548ce6434185cdd36e110c61315b4cb21849666 Catalin(ux) M. BOIE 2009-08-25 18:15:46
Added possibility to shutdown blackhole_s server by typing 'quit'. 5fd60900809e1a2d7554aa7fa93ce83b29214de0 Catalin(ux) M. BOIE 2009-08-25 17:54:27
Cosmetic changes. 7099dd49a270b9f4ecc0cb2e55254bef671202e5 Catalin(ux) M. BOIE 2009-08-25 17:54:15
Improved status output. 1ff597059bbb208b56ad18bf8324fae5b63950a2 Catalin(ux) M. BOIE 2009-08-25 17:53:44
Conn_type_* becomes CONN_TYPE_*. b284a20cc5430042cc662edc4d121c7f18cb3569 Catalin(ux) M. BOIE 2009-08-25 17:52:51
Improved status logging. 54fea00d8f16127244fd15b209c24f606adb20b3 Catalin(ux) M. BOIE 2009-08-25 17:33:14
Added Conn_strcasestr for case insensitive search in buffer. ca14b37b2a1f23887ad12fed729a3dd0ff253443 Catalin(ux) M. BOIE 2009-08-24 17:18:24
Improved ntime example. b63de9b82ffab1c0d759571a40f1d72f9b8df927 Catalin(ux) M. BOIE 2009-08-24 17:09:21
Commit 4e3f1aaabc21d4cbdac26e42612ebd0298c8d86e - Added Conn_lifetime (returns the time in ms between connected state and now).
Signed-off-by: Catalin(ux) M. BOIE <catab@embedromix.ro>
Author: Catalin(ux) M. BOIE
Author date (UTC): 2009-08-31 17:22
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2009-09-02 15:42
Parent(s): af960f317b8ca9a8f78fe44e80ddbdb6a9483e6f
Signing key:
Tree: ca806880a6e9ada322e02cf683f80094841b16ca
File Lines added Lines deleted
Conn.c 10 0
Conn.h 1 1
Conn_engine_core.h 2 0
File Conn.c changed (mode: 100644) (index 5906f34..06a40e2)
... ... static void Conn_poll_cb(struct Conn *C, int revents)
1230 1230
1231 1231 Conn_set_address(C, 0); Conn_set_address(C, 0);
1232 1232
1233 C->time_open = Conn_now;
1234
1233 1235 if (C->cb_connected != NULL) if (C->cb_connected != NULL)
1234 1236 C->cb_connected(C); C->cb_connected(C);
1235 1237 else if (Conn_connected_cb) else if (Conn_connected_cb)
 
... ... int Conn_poll(const int timeout)
1375 1377
1376 1378 return ret; return ret;
1377 1379 } }
1380
1381 /*
1382 * Returns the lifetime of a connection
1383 */
1384 unsigned long long Conn_lifetime(struct Conn *C)
1385 {
1386 return Conn_time_diff(&Conn_now, &C->time_open);
1387 }
File Conn.h changed (mode: 100644) (index 3e0391d..afedf88)
... ... extern int Conn_band(struct Conn *C, const unsigned int width,
28 28 extern struct Conn *Conn_alloc(void); extern struct Conn *Conn_alloc(void);
29 29 extern int Conn_commit(struct Conn *C); extern int Conn_commit(struct Conn *C);
30 30 extern char *Conn_sys(void); extern char *Conn_sys(void);
31
31 extern unsigned long long Conn_lifetime(struct Conn *C);
32 32 #endif #endif
File Conn_engine_core.h changed (mode: 100644) (index d5ee6e5..da7262d)
... ... struct Conn
180 180 void (*cb_error)(struct Conn *C); void (*cb_error)(struct Conn *C);
181 181 void (*cb_connected)(struct Conn *C); void (*cb_connected)(struct Conn *C);
182 182 void (*cb_accept_error)(struct Conn *C); void (*cb_accept_error)(struct Conn *C);
183
184 struct timeval time_open; /* When a connect succeded */
183 185 }; };
184 186
185 187 struct Conn_queue_entry struct Conn_queue_entry
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