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)
Updated duilder. 8bfb064fb40b962a0ed18f3af21fbfd0289672dd Catalin(ux) M. BOIE 2009-09-02 15:48:51
Added latency reporting. 218047bf22e2804a585703751b51c6b2d54c59ad Catalin(ux) M. BOIE 2009-09-02 16:29:44
TODO in/out. d56467202a5a6823716ae3e6e3e15cee93fe86d1 Catalin(ux) M. BOIE 2009-09-02 16:29:07
Ignore EMPTY state. ef0dbfef5db779a9bb3cb1782e00c62d1abc1b07 Catalin(ux) M. BOIE 2009-08-31 20:54:13
Increment Conn_pending only on success. e2bacc2941cb07836973f881d060e05018f28c62 Catalin(ux) M. BOIE 2009-08-31 20:53:53
Cosmetic changes. f09c89986ade60ff5f9a79f6080783acff11c3d5 Catalin(ux) M. BOIE 2009-08-31 20:53:33
Set start values for enums. f2d6b05dce0e058323101a4d6f159c0c4172941a Catalin(ux) M. BOIE 2009-08-31 20:52:41
Call close callback, even if state is ERROR. 58e96228277c188b7b072496e337be9c94f56eb1 Catalin(ux) M. BOIE 2009-08-31 20:52:17
Added Conn_work_to_do to signal when we can exit. 492d960bf3e5b3718fe69ffc8ef30fbe344a805f Catalin(ux) M. BOIE 2009-08-31 20:50:56
Splited reporting of error types. 2d28a3be0ebb1f5e3f548d2523ac591af7dee3b9 Catalin(ux) M. BOIE 2009-08-31 20:08:54
Conn_commit will return error, so, do not call error callback. c97f8be6cfd55c32d78e62a30375d7c014dc0e0a Catalin(ux) M. BOIE 2009-08-31 20:08:17
Cosmetic changes. 54a9e723c3a958e69f491b55df83f96b6814af44 Catalin(ux) M. BOIE 2009-08-31 20:07:51
Raised default listen para to 4096 from 128. somaxconn still has prio. af39935492f39786879ea6ced9f7dfe929c4879d Catalin(ux) M. BOIE 2009-08-31 19:56:36
Store in time_open the accept timestamp so Conn_lifetime will work on srv side. 0522d638872644d7bd6490027a7ae99b1fb4b16f Catalin(ux) M. BOIE 2009-08-31 19:55:44
Improved blackhole examples. 128f393aba2b07c4aa0e41d962a8239dffc3cc10 Catalin(ux) M. BOIE 2009-08-31 17:41:30
More entries to .gitignore. e1d71bcf46a9b61a4aa4e17b857ff9035d7fb6c7 Catalin(ux) M. BOIE 2009-08-31 17:39:45
Tweaked a little the debug level for some messages. 1a27a1acf2ede62fb02b074f232badeb847bfcb8 Catalin(ux) M. BOIE 2009-08-31 17:39:21
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
Commit 8bfb064fb40b962a0ed18f3af21fbfd0289672dd - Updated duilder.
Author: Catalin(ux) M. BOIE
Author date (UTC): 2009-09-02 15:48
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2009-09-02 16:23
Parent(s): 218047bf22e2804a585703751b51c6b2d54c59ad
Signing key:
Tree: 69fd9a1dce0aed51438e22c438e7df3d953b25f3
File Lines added Lines deleted
duilder 44 24
File duilder changed (mode: 100755) (index 8acd6af..7afe003)
... ... function duilder_git()
50 50
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 git-clone --bare . "${GIT_DEST}/${PRJ}.git"
53 git clone --bare . "${GIT_DEST}/${PRJ}.git"
54 54
55 55 # Activate post-update hook # Activate post-update hook
56 cp "${GIT_DEST}/${PRJ}.git/hooks/post-update.sample" \
57 "${GIT_DEST}/${PRJ}.git/hooks/post-update"
56 58 chmod a+x "${GIT_DEST}/${PRJ}.git/hooks/post-update" chmod a+x "${GIT_DEST}/${PRJ}.git/hooks/post-update"
57 59
58 60 # add project name and description # add project name and description
 
... ... function duilder_git()
62 64 #touch "${GIT_DEST}/${PRJ}.git/git-daemon-export-ok #touch "${GIT_DEST}/${PRJ}.git/git-daemon-export-ok
63 65 else else
64 66 # --force? # --force?
65 git-push -v --all "${GIT_DEST}/${PRJ}.git"
66 git-push -v --tags "${GIT_DEST}/${PRJ}.git"
67 git push -v --all "${GIT_DEST}/${PRJ}.git"
68 git push -v --tags "${GIT_DEST}/${PRJ}.git"
67 69 fi fi
68 (cd "${GIT_DEST}/${PRJ}.git" && git-update-server-info)
70 (cd "${GIT_DEST}/${PRJ}.git" && git update-server-info)
69 71
70 72
71 73 if [ "${GIT_CHANGELOG}" = "1" ]; then if [ "${GIT_CHANGELOG}" = "1" ]; then
 
... ... function duilder_git()
75 77 # get the list of tags # get the list of tags
76 78 i=0 i=0
77 79 number_of_tags=0 number_of_tags=0
78 for tag in `git-tag -l`; do
80 for tag in `git tag -l`; do
79 81 if [ "${tag:0:1}" != "v" ]; then if [ "${tag:0:1}" != "v" ]; then
80 82 # skip other kind of tags beside versions # skip other kind of tags beside versions
81 83 continue continue
82 84 fi fi
83 85
84 86 tags[${i}]=${tag} tags[${i}]=${tag}
85 tags_commit[${i}]=`git-show-ref ${tag} | cut -d' ' -f1`
87 tags_commit[${i}]=`git show-ref ${tag} | cut -d' ' -f1`
86 88 number_of_tags=$[${number_of_tags}+1] number_of_tags=$[${number_of_tags}+1]
87 89
88 90 i=$[${i}+1] i=$[${i}+1]
 
... ... function duilder_git()
90 92
91 93 # get the list of commits, test if is a tag and do the diff # get the list of commits, test if is a tag and do the diff
92 94 prev="" prev=""
93 git-log --pretty=oneline | cut -f1 | \
95 git log --pretty=oneline | cut -f1 | \
94 96 while read commit junk; do while read commit junk; do
95 97 # test if it is a tag # test if it is a tag
96 98 tag="" tag=""
 
... ... function duilder_git()
112 114 echo "[*] Generating Changelog from ${tag} -> ${prev}..." echo "[*] Generating Changelog from ${tag} -> ${prev}..."
113 115 echo "[${tag} -> ${prev}]" >> Changelog echo "[${tag} -> ${prev}]" >> Changelog
114 116 echo >> Changelog echo >> Changelog
115 git-shortlog ${tag}..${prev} | \
117 git shortlog ${tag}..${prev} | \
116 118 (IFS="" (IFS=""
117 119 while read line; do while read line; do
118 120 echo " ${line}" echo " ${line}"
 
... ... function duilder_srpm()
143 145 echo "Building SRPM..." echo "Building SRPM..."
144 146 rpmbuild -ts "${P}.tar.gz" rpmbuild -ts "${P}.tar.gz"
145 147
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
148 PKG="${RPMBUILD}/SRPMS/${P}-1.src.rpm"
151 149
152 150 if [ ! -z "${SRPM_DEST}" ]; then if [ ! -z "${SRPM_DEST}" ]; then
153 151 echo "Copying [${PKG}] to [${SRPM_DEST}]..." echo "Copying [${PKG}] to [${SRPM_DEST}]..."
 
... ... function duilder_tar()
176 174 echo "Generating tarball [${P}.tar.gz]..." echo "Generating tarball [${P}.tar.gz]..."
177 175 ADD_EXCLUDE="" ADD_EXCLUDE=""
178 176 if [ ! -z "${EXCLUDE}" ]; then if [ ! -z "${EXCLUDE}" ]; then
179 ADD_EXCLUDE="--exclude-from ${EXCLUDE}"
177 ADD_EXCLUDE="--exclude-from \"${P}/${EXCLUDE}\""
180 178 fi fi
181 179
182 (cd .. && rm -f "${P}" && ln -s "${PRJ}" "${P}")
183 tar czhf "${P}.tar.gz" \
180 (cd .. \
181 && rm -rf "${P}" \
182 && cp -a --link "${PRJ}" "${P}" \
183 && tar czf "${PRJ}/${P}.tar.gz" \
184 184 --exclude-vcs \ --exclude-vcs \
185 --exclude ./Makefile \
186 --exclude "${P}.tar.gz" \
185 --exclude ${P}/Makefile \
187 186 ${ADD_EXCLUDE} \ ${ADD_EXCLUDE} \
188 -C .. "${P}"
187 "${P}" \
188 && rm -rf "${P}")
189 189 echo "Done generating tarball!" echo "Done generating tarball!"
190 190
191 rm -f "../${P}"
192
193 191 echo "Copying source to ${EXPORT_PATH}/..." echo "Copying source to ${EXPORT_PATH}/..."
194 192 mkdir -p "${EXPORT_PATH}" mkdir -p "${EXPORT_PATH}"
195 193 cp -vp "${P}.tar.gz" "${EXPORT_PATH}/" cp -vp "${P}.tar.gz" "${EXPORT_PATH}/"
 
... ... function duilder_tar()
197 195
198 196 #################################################################### ####################################################################
199 197
198 # Variables
199 if [ -d "${HOME}/rpmbuild" ]; then
200 RPMBUILD="${HOME}/rpmbuild"
201 else
202 RPMBUILD="/usr/src/redhat"
203 fi
204
205
200 206 # Multiplexer # Multiplexer
201 207 if [ "${1}" = "docs" ]; then if [ "${1}" = "docs" ]; then
202 208 shift shift
 
... ... else
337 343 fi fi
338 344 echo "s#@MYSQL_FOUND@#${MYSQL_FOUND}#g" >> tmp.sed echo "s#@MYSQL_FOUND@#${MYSQL_FOUND}#g" >> tmp.sed
339 345
346 echo -n "Searching for poll..."
347 set +e
348 echo -e "#include <poll.h> \n int main(void) { return poll(0, 0, 0); }" | gcc -x c -pipe - -o /dev/null 2>/dev/null
349 E="${?}"
350 set -e
351 if [ "${E}" != "0" ]; then
352 echo " not found."
353 echo "s#@POLL_FOUND@#0#g" >> tmp.sed
354 else
355 echo " found."
356 echo "s#@POLL_FOUND@#1#g" >> tmp.sed
357 fi
358
340 359 echo -n "Searching for epoll..." echo -n "Searching for epoll..."
341 360 set +e set +e
342 361 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
 
... ... if [ -r "${PRJ}.spec.in" ]; then
430 449 sed -f tmp.sed ${PRJ}.spec.in > ${PRJ}.spec sed -f tmp.sed ${PRJ}.spec.in > ${PRJ}.spec
431 450 fi fi
432 451
433 if [ -r config.h.in ]; then
434 echo "Generate config.h file..."
435 sed -f tmp.sed config.h.in > config.h
452 if [ -z "${CONFIG_H}" ]; then
453 CONFIG_H="config.h"
436 454 fi fi
455 echo "Generating ${CONFIG_H} file..."
456 sed -f tmp.sed ${CONFIG_H}.in > ${CONFIG_H}
437 457
438 458 rm -f tmp.sed rm -f tmp.sed
439 459
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