From 111478ef4122b096c45baf792d6702c30ac03fc1 Mon Sep 17 00:00:00 2001 From: Steven Dwy Date: Sun, 24 Feb 2019 02:55:47 -0800 Subject: [PATCH] Fix #109 - TCPConnectionFunction is actually a delegate --- source/vibe/core/net.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/vibe/core/net.d b/source/vibe/core/net.d index 9ae6ef3..095e12d 100644 --- a/source/vibe/core/net.d +++ b/source/vibe/core/net.d @@ -145,12 +145,12 @@ TCPListener listenTCP(ushort port, void delegate(TCPConnection) connection_callb This function is the same as listenTCP but takes a function callback instead of a delegate. */ -TCPListener[] listenTCP_s(ushort port, TCPConnectionFunction connection_callback, TCPListenOptions options = TCPListenOptions.defaults) +TCPListener[] listenTCP_s(ushort port, TCPConnectionFunction connection_callback, TCPListenOptions options = TCPListenOptions.defaults) @trusted { return listenTCP(port, toDelegate(connection_callback), options); } /// ditto -TCPListener listenTCP_s(ushort port, TCPConnectionFunction connection_callback, string address, TCPListenOptions options = TCPListenOptions.defaults) +TCPListener listenTCP_s(ushort port, TCPConnectionFunction connection_callback, string address, TCPListenOptions options = TCPListenOptions.defaults) @trusted { return listenTCP(port, toDelegate(connection_callback), address, options); } @@ -255,7 +255,7 @@ NetworkAddress anyAddress() /// Callback invoked for incoming TCP connections. @safe nothrow alias TCPConnectionDelegate = void delegate(TCPConnection stream); /// ditto -@safe nothrow alias TCPConnectionFunction = void delegate(TCPConnection stream); +@safe nothrow alias TCPConnectionFunction = void function(TCPConnection stream); /**