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

Allow support for a server to run endpoints of different protocols #622

Closed
Badgerati opened this issue Nov 2, 2020 · 0 comments · Fixed by #623
Closed

Allow support for a server to run endpoints of different protocols #622

Badgerati opened this issue Nov 2, 2020 · 0 comments · Fixed by #623
Assignees
Milestone

Comments

@Badgerati
Copy link
Owner

Endpoints can be either Http, Https, Ws, Wss, Smtp, or Tcp. However, right now a server can only run with endpoints of just Http/Ws, or of just Smtp, or just Tcp.

This change will make it so it's possible to have a server with any protocols, so you could have an Http and Smtp endpoint in one server:

Start-PodeServer -Threads 2 {
    Add-PodeEndpoint -Address * -Port 8090 -Protocol Http
    Add-PodeEndpoint -Address * -Port 25 -Protocol Smtp

    Add-PodeRoute -Method Get -Path '/' -ScriptBlock {}
    Add-PodeHandler -Type Smtp -Name 'Main' -ScriptBlock {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant