Skip to content

eatonphil/referenceserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Barebones UNIX socket servers

I find myself writing this server in some language every few months. Each time I have to scour the web for a good reference. Use this as a reference to write your own bare server in C or other languages with a UNIX API (Python, OCaml, etc).

Run

make build-c
bin/cserver # go to localhost:15000

make build-ocaml
bin/ocamlserver # go to localhost:15000

make build-python
python2.7 bin/pythonserver # go to localhost:15000
# -- OR --
python3.5 python/server.py # go to localhost:15000

make build-sbcl
bin/sbclserver # go to localhost:15000

Notes

These servers are very minimal and require no external libraries. They may suffer from serious problems (reading/writing completely, blocking, single-threadedness, idiomaticness, etc). If you notice these issues, feel free to file an issue or create a PR. If a fix does not seriously impede on the simplicity of the example, the changes may be incorporated.

About

Barebones UNIX socket servers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published