trikko / serverino

Small and ready-to-go http server, in D
https://trikko.github.io/serverino/
MIT License
47 stars 2 forks source link

Cannot Use IPV6 #2

Closed duoduo70 closed 1 year ago

duoduo70 commented 1 year ago

config.d -> struct ServerinoConfig -> enum ListenerProtocol should be changed to static

trikko commented 1 year ago

Hey there! What was the problem? If it's not a bug, maybe I can improve docs.

duoduo70 commented 1 year ago

Hello! I want to use IPv6. I noticed template of method "config.d -> struct ServerinoConfig -> addListener" is "ListenerProtocol". But this enum is not static. I do not know how can use it. Can you help me? Thank you very well!

trikko commented 1 year ago

The right syntax is: yourconfig.addListener!(ServerinoConfig.ListenerProtocol.IPV6)("localhost", 8080)

But there's a regression (just a missing import) that I've fixed right now. So please upgrade your dependencies with: dub upgrade

Thank you for your report!