diff --git a/examples/echo-server/dub.sdl b/examples/echo-server/dub.sdl new file mode 100644 index 0000000..8c18b2b --- /dev/null +++ b/examples/echo-server/dub.sdl @@ -0,0 +1,3 @@ +name "echo-server" +description "A simple echo protocol server implementation" +dependency "vibe-core" path="../../" diff --git a/examples/echo-server/source/app.d b/examples/echo-server/source/app.d new file mode 100644 index 0000000..aa0a7f7 --- /dev/null +++ b/examples/echo-server/source/app.d @@ -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(); +}