Skip to content

Commit 27fa49a

Browse files
Squashing ~ 3,700 commits from 2013/2014 to present day...
1 parent b27bbce commit 27fa49a

File tree

216 files changed

+32084
-204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+32084
-204
lines changed

.gitignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,53 @@
2121
*.i*86
2222
*.x86_64
2323
*.hex
24+
25+
# Autogen'ed files:
26+
Makefile.in
27+
aclocal.m4
28+
ar-lib
29+
autom4te.cache
30+
build
31+
build-aux
32+
compile
33+
config.guess
34+
config.h.in
35+
config.h.in~
36+
ymo_config.h.in
37+
ymo_config.h.in~
38+
config.sub
39+
configure
40+
depcomp
41+
install-sh
42+
ltmain.sh
43+
m4/*
44+
missing
45+
test-driver
46+
47+
# Vim temp files:
48+
*.swp
49+
50+
# Vim YouCompleteMe C flags files:
51+
.ycm_extra_conf.py
52+
53+
# Tag files, etc
54+
cscope.out
55+
tags
56+
57+
# Python bytecode:
58+
*.pyc
59+
*.pyo
60+
61+
# TCPFlow Files:
62+
alerts.txt
63+
report.xml
64+
65+
# Local development files
66+
local_dev
67+
68+
# Exceptions:
69+
!m4/ymo_*
70+
!m4/ax_*
71+
72+
# Backup files:
73+
*~

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
andrew-canaday <andrew.canaday@gmail.com> andrew-canaday <andrew.canaday@nytimes.com>

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
pre-release-0.0.0
2+
-----------------
3+
4+
*NOTICE*:
5+
This release is being cut _purely to make sure that the *master* branch
6+
contains appropriate licensing information_ (GPLv3). This semi-functional
7+
release and is _not recommended for use by anyone for any purpose._ This
8+
software package has not been publicly released. The licensing terms are
9+
tentative. If you have received a copy of this software, it has likely been
10+
in error. Please reach out to the package maintainer for more information.
11+
12+

LICENSE

Lines changed: 674 additions & 201 deletions
Large diffs are not rendered by default.

Makefile.am

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
##=============================================================================
2+
##
3+
## libyimmo: Top-level automake file
4+
##
5+
##=============================================================================
6+
#==============================================================================
7+
# libyimmo
8+
#
9+
# Copyright (c) 2014 Andrew Canaday
10+
#
11+
# This program is free software: you can redistribute it and/or modify
12+
# it under the terms of the GNU General Public License as published by
13+
# the Free Software Foundation, either version 3 of the License, or
14+
# (at your option) any later version.
15+
#
16+
# This program is distributed in the hope that it will be useful,
17+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
# GNU General Public License for more details.
20+
#
21+
# You should have received a copy of the GNU General Public License
22+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
23+
#
24+
#==============================================================================
25+
26+
.PHONY: fmt
27+
28+
ACLOCAL_AMFLAGS=-Im4
29+
30+
SUBDIRS=\
31+
include \
32+
lib \
33+
mod \
34+
example \
35+
wsgi \
36+
benchmarks \
37+
doc
38+
39+
pkgconfig_DATA=@PACKAGE_NAME@-@PACKAGE_MAJOR@.@PACKAGE_MINOR@.pc
40+
41+
yimmodir=@YIMMO_INCLUDEDIR@
42+
yimmo_HEADERS=\
43+
ymo_config.h
44+
45+
# TODO: use 'install' to install things...
46+
47+
# NOTE: This will overwrite the major-version directory, even if installing
48+
# a lesser minor version (e.g. installing v1.2 after previously insstalling
49+
# v1.3 will result in libyimmo-1.pc -> libyimmo-1.2.pc).
50+
install-data-hook:
51+
cd $(DESTDIR)@includedir@ && \
52+
$(LN_S) -f @YIMMO_INCLUDE@ yimmo-${PACKAGE_MAJOR}
53+
cd $(DESTDIR)@pkgconfigdir@ && \
54+
$(LN_S) -f \
55+
@PACKAGE_NAME@-@PACKAGE_MAJOR@.@PACKAGE_MINOR@.pc \
56+
@PACKAGE_NAME@-@PACKAGE_MAJOR@.pc
57+
58+
fmt:
59+
$(top_srcdir)/util/fmt-code.sh
60+
61+
## EOF
62+

README.md

Lines changed: 90 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,91 @@
1-
libsockjs
2-
=========
1+
# libyimmo
2+
3+
> :warning: **WARNING**: _This is my long running, spare time, for fun,
4+
> project._ Most of it works pretty well (it's pretty _fast!_), but it also
5+
> bears the marks of being my on-again/off-again, personal C-refresher/protocol
6+
> exploration playground...
7+
>
8+
> To be clear: I would not even consider using this in production for *anything*
9+
> until after some test coverage and usability things have been addressed!
10+
> (I generally use [gunicorn](https://gunicorn.org/) for my production WSGI workloads and
11+
> [libwebsockets](https://libwebsockets.org/) for websockets. Check 'em out!)
12+
>
13+
> There's a bit of cleanup work in flight, and _things are likely to change a
14+
> bit as the refactor proceeds!_
15+
>
16+
> I've got a pretty extensive TODO list, but the following neatly summarizes
17+
> the current state of things:
18+
>
19+
> 1. The unpruned vestiges of more than a handful of experiments are still
20+
> nestled in the code.
21+
> 2. Hacks and ugly kludges abound.
22+
> 3. There are missing/out of date docs and many a translation unit needs
23+
> shuffling.
24+
>
25+
> :information_source: **I'm not accepting PR's, at the moment**, due to 1-3
26+
> and some procedural things to resolve re: code contributions.
27+
>
28+
> _Please feel free to have a peek! It's **GPL'd**, so you are free to fork
29+
> it and hack around!_
30+
>
31+
> (Just mind the cobwebs).
32+
33+
# Introduction
34+
Yimmo (<i><b>Y</b>up, <b>I</b> <b>M</b>ade <b>M</b>y <b>O</b>wn</i>) is a
35+
streaming socket framework. The I/O architecture is a traditional reactor
36+
pattern which uses [libev](http://software.schmorp.de/pkg/libev.html) for I/O readiness notifications.
37+
38+
> :bulb: Want to get the gist in a hurry?
39+
>
40+
> - [HTTP](./example/doc/HTTP.md) — minimal libyimmo_http web server
41+
> - [WebSockets](./example/doc/WS.md) — minimal libyimmo_ws socket server
42+
> - [WSGI](http://blog.yimmo.org/yimmo/wsgi/index.html)
43+
44+
## Documentation
45+
46+
- [libyimmo](http://blog.yimmo.org/yimmo/index.html)
47+
- [WSGI](http://blog.yimmo.org/yimmo/wsgi/index.html)
48+
49+
## Features
50+
51+
- [x] HTTP 1.0
52+
- [x] HTTP 1.1
53+
- [x] RFC6455 WebSockets
54+
- [x] WSGI
55+
56+
### Planned/Partial
57+
58+
- [ ] MQTT (_partial_)
59+
- [ ] HTTP2 (_WIP_)
60+
61+
## Building
62+
63+
This library is built using C11 (but _attempts_ to accommodate other C standards
64+
using a [autoconf](https://www.gnu.org/software/autoconf/Libyimmo) macros and
65+
compiler extensions).
66+
67+
### Dependencies
68+
69+
Libyimmo requires the following third party libraries:
70+
- [libev](http://software.schmorp.de/pkg/libev.html) for event management
71+
- [libbsat](https://github.com/andrew-canaday/libbsat) for timeout management
72+
- a UUID library — either linux-ng or OSSP ([ax_check_uuid_api.m4](./m4/ax_check_uuid_api.m4) for details)
73+
74+
75+
### Setup
76+
77+
Before anything else is done, your source directory has to be initialized:
78+
79+
```bash
80+
./autogen.sh
81+
```
82+
83+
### Compiling
84+
Libyimmo compilation follows the standard GNU idiom:
85+
86+
```bash
87+
# PRO TIP: do your builds outside of the project root!
88+
mkdir -p ./build && cd ./build
89+
../configure --prefix=/usr/local && make && make check && make install
90+
```
391

4-
SockJS C library.

autogen.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
GLIBTOOLIZE="$( type -p glibtoolize 2>/dev/null )"
4+
if [ -n "${GLIBTOOLIZE_PATH}" ]; then
5+
export LIBTOOLIZE="${GLIBTOOLIZE}"
6+
fi
7+
8+
autoreconf -vif
9+
10+
date
11+
12+
# EOF
13+

benchmarks/Makefile.am

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
##=============================================================================
2+
##
3+
## libyimmo: benchmarks/Makefile.am
4+
##
5+
##=============================================================================
6+
#==============================================================================
7+
# libyimmo
8+
#
9+
# Copyright (c) 2014 Andrew Canaday
10+
#
11+
# This program is free software: you can redistribute it and/or modify
12+
# it under the terms of the GNU General Public License as published by
13+
# the Free Software Foundation, either version 3 of the License, or
14+
# (at your option) any later version.
15+
#
16+
# This program is distributed in the hope that it will be useful,
17+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
# GNU General Public License for more details.
20+
#
21+
# You should have received a copy of the GNU General Public License
22+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
23+
#
24+
#==============================================================================
25+
26+
AM_CFLAGS=\
27+
-I@top_srcdir@/lib \
28+
-I@top_srcdir@/include \
29+
-I@top_srcdir@/mod/http \
30+
-I@top_srcdir@/mod/http/include \
31+
-I@srcdir@
32+
33+
LDADD=\
34+
@top_builddir@/lib/libyimmo.la \
35+
@top_builddir@/mod/http/libyimmo_http.la
36+
37+
AM_DEFAULT_SOURCE_EXT=.c
38+
if BUILD_BENCHMARKS
39+
bin_PROGRAMS=\
40+
benchmark_trie
41+
else
42+
EXTRA_PROGRAMS=\
43+
benchmark_trie
44+
endif
45+
46+
# EOF
47+

0 commit comments

Comments
 (0)