-
-
Notifications
You must be signed in to change notification settings - Fork 24
Add constructor with IP address #339
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
Conversation
- Add parameter to WebServer constructor and rework constructors accordingly. - Update README to add note for this new parameter.
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for specifying an IP address when creating a WebServer instance, which is necessary for scenarios where the server needs to bind to a specific interface (e.g., when serving from an ESP32 soft access point). The changes introduce a new constructor parameter while maintaining backward compatibility through constructor chaining.
Key Changes
- Added a new constructor parameter for IP address binding in the WebServer class
- Updated existing constructors to chain to the new comprehensive constructor
- Updated README documentation to mention the new optional IP address parameter
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| nanoFramework.WebServer/WebServer.cs | Added IP address parameter to constructors and updated HttpListener instantiation |
| README.md | Added documentation note about optional IP address parameter |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Ellerbach
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me



Description
Motivation and Context
HttpListenerwith a null IPAddress parameter the code grabs the IP from the default interface. When serving pages from a soft AP, the IP address is different. Therefore, it's necessary to allow the caller to specify an IP address to bind the server to.How Has This Been Tested?
Screenshots
Types of changes
Checklist: