Zelphir Kaltstahl 2214aa59be add some description | %!s(int64=5) %!d(string=hai) anos | |
---|---|---|
.. | ||
networking-lib | %!s(int64=6) %!d(string=hai) anos | |
dependencies.md | %!s(int64=6) %!d(string=hai) anos | |
official-guile-guide-examples.scm | %!s(int64=5) %!d(string=hai) anos | |
readme.org | %!s(int64=5) %!d(string=hai) anos | |
run-client.scm | %!s(int64=5) %!d(string=hai) anos | |
run-server.scm | %!s(int64=5) %!d(string=hai) anos | |
tcp-client.scm | %!s(int64=5) %!d(string=hai) anos | |
tcp-server.scm | %!s(int64=5) %!d(string=hai) anos |
This example presents a way to use Guile to build a naive TCP client and TCP server.
One idea in this example implementation is, that you can define a protocol for the server and for the client separately, by specifying ...
... for each end.
The example defines a JSON display protocol, which simply displays any JSON received from the server and a JSON echo protocol for the server, which simply sends back whatever the server receives.
For a real application one can imagine all kind of things to be invoked from the handlers, which constitute a protocol.
This example does not deal with any complex logic implemented in the handlers.