vibe-core/examples/echo-server/source/app.d
2020-08-21 15:39:02 +09:00

15 lines
291 B
D

import vibe.core.core : runApplication;
import vibe.core.log;
import vibe.core.net : listenTCP;
import vibe.core.stream : pipe;
void main()
{
listenTCP(7000, (conn) @safe nothrow {
try pipe(conn, conn);
catch (Exception e)
logError("Error: %s", e.msg);
});
runApplication();
}