Make the address parameter of send() scoped.
This commit is contained in:
parent
17c4fe65a8
commit
1385250884
|
@ -99,7 +99,7 @@ interface EventDriverSockets {
|
||||||
bool setBroadcast(DatagramSocketFD socket, bool enable);
|
bool setBroadcast(DatagramSocketFD socket, bool enable);
|
||||||
void receive(DatagramSocketFD socket, ubyte[] buffer, IOMode mode, DatagramIOCallback on_receive_finish);
|
void receive(DatagramSocketFD socket, ubyte[] buffer, IOMode mode, DatagramIOCallback on_receive_finish);
|
||||||
void cancelReceive(DatagramSocketFD socket);
|
void cancelReceive(DatagramSocketFD socket);
|
||||||
void send(DatagramSocketFD socket, const(ubyte)[] buffer, IOMode mode, Address target_address, DatagramIOCallback on_send_finish);
|
void send(DatagramSocketFD socket, const(ubyte)[] buffer, IOMode mode, scope Address target_address, DatagramIOCallback on_send_finish);
|
||||||
void cancelSend(DatagramSocketFD socket);
|
void cancelSend(DatagramSocketFD socket);
|
||||||
|
|
||||||
/** Increments the reference count of the given resource.
|
/** Increments the reference count of the given resource.
|
||||||
|
|
|
@ -169,7 +169,7 @@ final class LibasyncEventDriverSockets : EventDriverSockets {
|
||||||
assert(false, "TODO!");
|
assert(false, "TODO!");
|
||||||
}
|
}
|
||||||
|
|
||||||
override void send(DatagramSocketFD socket, const(ubyte)[] buffer, IOMode mode, Address target_address, DatagramIOCallback on_send_finish)
|
override void send(DatagramSocketFD socket, const(ubyte)[] buffer, IOMode mode, scope Address target_address, DatagramIOCallback on_send_finish)
|
||||||
{
|
{
|
||||||
assert(false, "TODO!");
|
assert(false, "TODO!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -737,7 +737,7 @@ final class PosixEventDriverSockets(Loop : PosixEventLoop) : EventDriverSockets
|
||||||
() @trusted { return cast(DatagramIOCallback)slot.readCallback; } ()(socket, IOStatus.ok, ret, src_addrc);
|
() @trusted { return cast(DatagramIOCallback)slot.readCallback; } ()(socket, IOStatus.ok, ret, src_addrc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void send(DatagramSocketFD socket, const(ubyte)[] buffer, IOMode mode, Address target_address, DatagramIOCallback on_send_finish)
|
void send(DatagramSocketFD socket, const(ubyte)[] buffer, IOMode mode, scope Address target_address, DatagramIOCallback on_send_finish)
|
||||||
{
|
{
|
||||||
assert(mode != IOMode.all, "Only IOMode.immediate and IOMode.once allowed for datagram sockets.");
|
assert(mode != IOMode.all, "Only IOMode.immediate and IOMode.once allowed for datagram sockets.");
|
||||||
|
|
||||||
|
|
|
@ -321,7 +321,7 @@ final class WinAPIEventDriverSockets : EventDriverSockets {
|
||||||
assert(false, "TODO!");
|
assert(false, "TODO!");
|
||||||
}
|
}
|
||||||
|
|
||||||
override void send(DatagramSocketFD socket, const(ubyte)[] buffer, IOMode mode, Address target_address, DatagramIOCallback on_send_finish)
|
override void send(DatagramSocketFD socket, const(ubyte)[] buffer, IOMode mode, scope Address target_address, DatagramIOCallback on_send_finish)
|
||||||
{
|
{
|
||||||
assert(false, "TODO!");
|
assert(false, "TODO!");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue