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)
Duilder updates. 30f5e95e50703f2bb3e5ba6f088b09f858e0e95c Catalin(ux) M. BOIE 2009-03-09 08:58:40
Extended timeout to 1000ms from 500ms. No need to wake up too frequent. ea268527d103d09685192399bbad6ebbd22430e8 Catalin(ux) M. BOIE 2009-03-06 13:11:36
Bump version in duilder. cbe72841517c536aa714fd8dfdbe1799248664e2 Catalin(ux) M. BOIE 2009-03-05 15:35:37
Added suport to bind to a specific IP. 5de8bd574a0bd2b57cc0ea98c4c20186dcfc9d8c Catalin(ux) M. BOIE 2009-03-02 13:59:07
TODO: Added bind to ip and access control. d7dd6bd61fdb4974da679979f05913cc24c9c0ae Catalin(ux) M. BOIE 2009-03-02 13:34:13
Lot of small changes that were need to fix epoll integration. 92877346e9cbecc7bea6f6d342e6d03475349878 Catalin(ux) M. BOIE 2009-02-26 12:20:07
Fixed the server example to output a \n terminated line. ed20ea84c9c6bd5dc9a3c066d03e4c8a049e1369 Catalin(ux) M. BOIE 2009-02-26 12:16:33
Added an accept_error callback to server example (s.c). 7014b75488c82c4b1f1c5b52cf7d4d2278719f4d Catalin(ux) M. BOIE 2009-02-26 12:15:56
Fixed exit from client example (c.c) to catch leaks. b912a406c59719919d3d98f4ca92cbbb3f986e99 Catalin(ux) M. BOIE 2009-02-26 12:15:08
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
Commit 30f5e95e50703f2bb3e5ba6f088b09f858e0e95c - Duilder updates.
Author: Catalin(ux) M. BOIE
Author date (UTC): 2009-03-09 08:58
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2009-03-09 08:58
Parent(s): ea268527d103d09685192399bbad6ebbd22430e8
Signing key:
Tree: a7ec7f9bcfd223de8516205ea7fa5ac7ad1ce3be
File Lines added Lines deleted
duilder 48 29
File duilder changed (mode: 100755) (index c725a3c..8acd6af)
... ... function duilder_docs()
9 9 EXPORT_PATH="${3}" EXPORT_PATH="${3}"
10 10
11 11 echo "Copying docs to [${EXPORT_PATH}]..." echo "Copying docs to [${EXPORT_PATH}]..."
12 for f in README License LICENCE Changelog TODO FAQ INSTALL; do
12 for f in README License LICENSE Changelog TODO FAQ INSTALL; do
13 13 if [ -r "${f}" ]; then if [ -r "${f}" ]; then
14 14 cp -vp "${f}" "${EXPORT_PATH}/" cp -vp "${f}" "${EXPORT_PATH}/"
15 15 fi fi
 
... ... function duilder_git()
51 51 echo "Generate GIT tree for HTTP transport..." echo "Generate GIT tree for HTTP transport..."
52 52 if [ ! -d "${GIT_DEST}/${PRJ}.git" ]; then if [ ! -d "${GIT_DEST}/${PRJ}.git" ]; then
53 53 git-clone --bare . "${GIT_DEST}/${PRJ}.git" git-clone --bare . "${GIT_DEST}/${PRJ}.git"
54
55 # Activate post-update hook
54 56 chmod a+x "${GIT_DEST}/${PRJ}.git/hooks/post-update" chmod a+x "${GIT_DEST}/${PRJ}.git/hooks/post-update"
57
58 # add project name and description
55 59 echo "${PRJ}" > "${GIT_DEST}/${PRJ}.git/description" echo "${PRJ}" > "${GIT_DEST}/${PRJ}.git/description"
60
56 61 # allow export by git daemon? # allow export by git daemon?
57 62 #touch "${GIT_DEST}/${PRJ}.git/git-daemon-export-ok #touch "${GIT_DEST}/${PRJ}.git/git-daemon-export-ok
58 63 else else
 
... ... function duilder_srpm()
138 143 echo "Building SRPM..." echo "Building SRPM..."
139 144 rpmbuild -ts "${P}.tar.gz" rpmbuild -ts "${P}.tar.gz"
140 145
141 PKG="/usr/src/redhat/SRPMS/${P}-1.src.rpm"
146 if [ -d ~/rpmbuild ]; then
147 PKG="${HOME}/rpmbuild/SRPMS/${P}-1.src.rpm"
148 else
149 PKG="/usr/src/redhat/SRPMS/${P}-1.src.rpm"
150 fi
142 151
143 152 if [ ! -z "${SRPM_DEST}" ]; then if [ ! -z "${SRPM_DEST}" ]; then
144 echo "Copying to [${SRPM_DEST}]..."
153 echo "Copying [${PKG}] to [${SRPM_DEST}]..."
145 154 cp -vp "${PKG}" "${SRPM_DEST}/" cp -vp "${PKG}" "${SRPM_DEST}/"
146 155 fi fi
147 156
 
... ... function duilder_tar()
188 197
189 198 #################################################################### ####################################################################
190 199
191 ###### Multiplexer
200 # Multiplexer
192 201 if [ "${1}" = "docs" ]; then if [ "${1}" = "docs" ]; then
193 202 shift shift
194 203 duilder_docs "$@" duilder_docs "$@"
 
... ... done
284 293 DB_SUPPORT=0 DB_SUPPORT=0
285 294
286 295 echo -n "Searching for PostgreSQL..." echo -n "Searching for PostgreSQL..."
287 PG_FOUND=0
288 PG_VERSION=""
289 296 set +e set +e
290 297 PG_VERSION="`pg_config --version 2>/dev/null`" PG_VERSION="`pg_config --version 2>/dev/null`"
291 298 set -e set -e
292 299 if [ -z "${PG_VERSION}" ]; then if [ -z "${PG_VERSION}" ]; then
293 300 echo " not found." echo " not found."
301 PG_FOUND=0
294 302 else else
295 303 echo " found version ${PG_VERSION}." echo " found version ${PG_VERSION}."
296 304 PG_FOUND=1 PG_FOUND=1
297 PG_INC="${DB_INC} -I`pg_config --includedir`"
298 PG_LIB="${DB_INC} -L`pg_config --libdir` -lpq"
305 PG_INC="-I`pg_config --includedir`"
306 PG_LIB="-L`pg_config --libdir` -lpq"
307
308 echo "s#@PG_VERSION@#${PG_VERSION}#g" >> tmp.sed
309 echo "s#@PG_INC@#${PG_INC}#g" >> tmp.sed
310 echo "s#@PG_LIB@#${PG_LIB}#g" >> tmp.sed
311
299 312 DB_SUPPORT=1 DB_SUPPORT=1
313 echo "s#@DB_SUPPORT@#${DB_SUPPORT}#g" >> tmp.sed
300 314 fi fi
315 echo "s#@PG_FOUND@#${PG_FOUND}#g" >> tmp.sed
316
301 317
302 echo -n "Searching for poll..."
318 echo -n "Searching for MySQL..."
303 319 set +e set +e
304 echo -e "#include <sys/poll.h> \n int main(void) { struct pollfd x; memset(&x, 0, sizeof(struct pollfd)); return poll(&x, 1, 0); }" | gcc -x c -pipe - -o /dev/null 2>/dev/null
320 MYSQL_VERSION="`mysql_config --version 2>/dev/null`"
305 321 set -e set -e
306 E="${?}"
307 if [ "${E}" != "0" ]; then
322 if [ -z "${MYSQL_VERSION}" ]; then
308 323 echo " not found." echo " not found."
309 echo "s#@POLL_FOUND@#0#g" >> tmp.sed
324 MYSQL_FOUND=0
310 325 else else
311 echo " found."
312 echo "s#@POLL_FOUND@#1#g" >> tmp.sed
326 echo " found version ${MYSQL_VERSION}."
327 MYSQL_FOUND=1
328 MYSQL_INC="`mysql_config --include`"
329 MYSQL_LIB="`mysql_config --libs`"
330
331 echo "s#@MYSQL_VERSION@#${MYSQL_VERSION}#g" >> tmp.sed
332 echo "s#@MYSQL_INC@#${MYSQL_INC}#g" >> tmp.sed
333 echo "s#@MYSQL_LIB@#${MYSQL_LIB}#g" >> tmp.sed
334
335 DB_SUPPORT=1
336 echo "s#@DB_SUPPORT@#${DB_SUPPORT}#g" >> tmp.sed
313 337 fi fi
338 echo "s#@MYSQL_FOUND@#${MYSQL_FOUND}#g" >> tmp.sed
314 339
315 340 echo -n "Searching for epoll..." echo -n "Searching for epoll..."
316 341 set +e set +e
317 342 echo -e "#include <sys/epoll.h> \n int main(void) { return epoll_create(64); }" | gcc -x c -pipe - -o /dev/null 2>/dev/null echo -e "#include <sys/epoll.h> \n int main(void) { return epoll_create(64); }" | gcc -x c -pipe - -o /dev/null 2>/dev/null
318 set -e
319 343 E="${?}" E="${?}"
344 set -e
320 345 if [ "${E}" != "0" ]; then if [ "${E}" != "0" ]; then
321 346 echo " not found." echo " not found."
322 347 echo "s#@EPOLL_FOUND@#0#g" >> tmp.sed echo "s#@EPOLL_FOUND@#0#g" >> tmp.sed
 
... ... fi
329 354 echo "s#@PRJ@#${PRJ}#g" >> tmp.sed echo "s#@PRJ@#${PRJ}#g" >> tmp.sed
330 355 echo "s#@VER@#${VER}#g" >> tmp.sed echo "s#@VER@#${VER}#g" >> tmp.sed
331 356 echo "s#@REV@#${REV}#g" >> tmp.sed echo "s#@REV@#${REV}#g" >> tmp.sed
357 echo "s#@DESCRIPTION@#${DESCRIPTION}#g" >> tmp.sed
358
332 359 echo "s#@ETC@#${ETC}#g" >> tmp.sed echo "s#@ETC@#${ETC}#g" >> tmp.sed
333 360 echo "s#@BIN@#${BIN}#g" >> tmp.sed echo "s#@BIN@#${BIN}#g" >> tmp.sed
334 361 echo "s#@USR_BIN@#${USR_BIN}#g" >> tmp.sed echo "s#@USR_BIN@#${USR_BIN}#g" >> tmp.sed
 
... ... echo "s#@USR_INCLUDE@#${USR_INCLUDE}#g" >> tmp.sed
339 366 echo "s#@USR_INC@#${USR_INCLUDE}#g" >> tmp.sed echo "s#@USR_INC@#${USR_INCLUDE}#g" >> tmp.sed
340 367 echo "s#@USR_LIB@#${USR_LIB}#g" >> tmp.sed echo "s#@USR_LIB@#${USR_LIB}#g" >> tmp.sed
341 368 echo "s#@USR_SHARE_DOC@#${USR_SHARE_DOC}#g" >> tmp.sed echo "s#@USR_SHARE_DOC@#${USR_SHARE_DOC}#g" >> tmp.sed
342 # PG stuff
343 echo "s#@PG_VERSION@#${PG_VERSION}#g" >> tmp.sed
344 echo "s#@PG_FOUND@#${PG_FOUND}#g" >> tmp.sed
345 echo "s#@PG_INC@#${PG_INC}#g" >> tmp.sed
346 echo "s#@PG_LIB@#${PG_LIB}#g" >> tmp.sed
347 # DB stuff
348 echo "s#@DB_SUPPORT@#${DB_SUPPORT}#g" >> tmp.sed
349 369 # Export stuff # Export stuff
350 370 echo "s#@EXPORT_PATH@#${EXPORT_PATH}#g" >> tmp.sed echo "s#@EXPORT_PATH@#${EXPORT_PATH}#g" >> tmp.sed
351 371
 
... ... if [ -r Makefile.in ]; then
378 398 echo "export PG_FOUND := ${PG_FOUND}" >> Makefile echo "export PG_FOUND := ${PG_FOUND}" >> Makefile
379 399 echo "export PG_INC := ${PG_INC}" >> Makefile echo "export PG_INC := ${PG_INC}" >> Makefile
380 400 echo "export PG_LIB := ${PG_LIB}" >> Makefile echo "export PG_LIB := ${PG_LIB}" >> Makefile
401 echo "# MySQL" >> Makefile
402 echo "export MYSQL_FOUND := ${MYSQL_FOUND}" >> Makefile
403 echo "export MYSQL_INC := ${MYSQL_INC}" >> Makefile
404 echo "export MYSQL_LIB := ${MYSQL_LIB}" >> Makefile
381 405 echo >> Makefile echo >> Makefile
382 406 echo "# duilder header ends #" >> Makefile echo "# duilder header ends #" >> Makefile
383 407 echo >> Makefile echo >> Makefile
 
... ... if [ -r "${PRJ}.spec.in" ]; then
407 431 fi fi
408 432
409 433 if [ -r config.h.in ]; then if [ -r config.h.in ]; then
410 echo "Generating config.h file..."
434 echo "Generate config.h file..."
411 435 sed -f tmp.sed config.h.in > config.h sed -f tmp.sed config.h.in > config.h
412 436 fi fi
413 437
414 if [ -r "${CONFIG_H}.in" ]; then
415 echo "Generating ${CONFIG_H} file..."
416 sed -f tmp.sed "${CONFIG_H}.in" > "${CONFIG_H}"
417 fi
418
419 438 rm -f tmp.sed rm -f tmp.sed
420 439
421 440 if [ "`basename ${0}`" = "duilderx" ]; then if [ "`basename ${0}`" = "duilderx" ]; then
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