kore/examples/python-async
Joris Vink 7350131232 Allow listening of tls/notls ports at the same time.
Before kore needed to be built with NOTLS=1 to be able to do non TLS
connections. This has been like this for years.

It is time to allow non TLS listeners without having to rebuild Kore.

This commit changes your configuration format and will break existing
applications their config.

Configurations now get listener {} contexts:

listen default {
	bind 127.0.0.1 8888
}

The above will create a listener on 127.0.0.1, port 8888 that will serve
TLS (still the default).

If you want to turn off TLS on that listener, specify "tls no" in that
context.

Domains now need to be attached to a listener:

Eg:
	domain * {
		attach	default
	}

For the Python API this kills kore.bind(), and kore.bind_unix(). They are
replaced with:

	kore.listen("name", ip=None, port=None, path=None, tls=True).
2019-09-27 12:27:04 +02:00
..
conf Allow listening of tls/notls ports at the same time. 2019-09-27 12:27:04 +02:00
src close the wrapped socket instead of the os one. 2019-09-25 15:47:14 +02:00
.gitignore Add python-async example. 2018-11-22 15:23:44 +01:00
README.md Add asynchronous libcurl support. 2019-04-24 00:15:17 +02:00

README.md

Kore python async/await examples.

This example also shows off the asynchronous HTTP client support and requires libcurl on your machine.

Run:

	$ kodev run

Test:

	$ curl -k http://127.0.0.1:8888/queue
	$ curl -k http://127.0.0.1:8888/lock
	$ curl -k http://127.0.0.1:8888/proc
	$ curl -k http://127.0.0.1:8888/socket
	$ curl -k http://127.0.0.1:8888/httpclient