Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCPConnectionFunction is a delegate and not a function pointer #109

Closed
WebFreak001 opened this issue Dec 19, 2018 · 1 comment
Closed

TCPConnectionFunction is a delegate and not a function pointer #109

WebFreak001 opened this issue Dec 19, 2018 · 1 comment

Comments

@WebFreak001
Copy link
Contributor

WebFreak001 commented Dec 19, 2018

/// Callback invoked for incoming TCP connections.
@safe nothrow alias TCPConnectionDelegate = void delegate(TCPConnection stream);
/// ditto
@safe nothrow alias TCPConnectionFunction = void delegate(TCPConnection stream);

This makes the listenTCP_s documentation stating that it accepts a function pointer wrong.

Is this intended? Would changing this break old code?

@Yoplitein
Copy link
Contributor

Calling toDelegate with a delegate is a no-op. This seems like a mistake made when copy-pasting.

dlang-bot added a commit that referenced this issue Feb 24, 2019
Fix #109 - TCPConnectionFunction is actually a delegate
merged-on-behalf-of: Sönke Ludwig <s-ludwig@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants