Add echo server example.
This commit is contained in:
parent
90d5784c2d
commit
59e3112e95
3
examples/echo-server/dub.sdl
Normal file
3
examples/echo-server/dub.sdl
Normal file
|
@ -0,0 +1,3 @@
|
|||
name "echo-server"
|
||||
description "A simple echo protocol server implementation"
|
||||
dependency "vibe-core" path="../../"
|
9
examples/echo-server/source/app.d
Normal file
9
examples/echo-server/source/app.d
Normal file
|
@ -0,0 +1,9 @@
|
|||
import vibe.core.core : runApplication;
|
||||
import vibe.core.net : listenTCP;
|
||||
import vibe.core.stream : pipe;
|
||||
|
||||
void main()
|
||||
{
|
||||
listenTCP(7000, (conn) => pipe(conn, conn));
|
||||
runApplication();
|
||||
}
|
Loading…
Reference in a new issue