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

Configure host with --host #74

Merged
merged 3 commits into from Apr 18, 2019
Merged

Configure host with --host #74

merged 3 commits into from Apr 18, 2019

Conversation

notmgsk
Copy link
Member

@notmgsk notmgsk commented Apr 17, 2019

e.g. using --host 127.0.0.1 restricts incoming connections to those
from localhost

e.g. using --host 127.0.0.1 restricts incoming connections to those
from localhost
@notmgsk notmgsk requested a review from a team as a code owner April 17, 2019 21:16
@@ -34,6 +34,11 @@
:optional t
:documentation "start a QVM server")

(("host")
:type string
:optional t
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use :initial-value here, or w/e the kw is, and nix the globvar?

:type string
:optional t
:documentation "host on which to start the QVM server")

(("port" #\p)
:type integer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with here

@@ -190,18 +195,20 @@ Copyright (c) 2016-2019 Rigetti Computing.~2%")
(or *num-workers* (max 1 (qvm:count-logical-cores))))
nil)

(defparameter *host-address* "0.0.0.0")
(defparameter *default-host-address* "0.0.0.0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nix these two defaults

(check-type port (or null (integer 0 65535))
"The port must be between 0 and 65535.")
(when (null host)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nix

(check-type port (or null (integer 0 65535))
"The port must be between 0 and 65535.")
(when (null host)
(setf host *default-host-address*))
(when (null port)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nix

@stylewarning stylewarning merged commit b985236 into master Apr 18, 2019
@stylewarning stylewarning deleted the feature/configure-host branch April 18, 2019 20:12
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

Successfully merging this pull request may close these issues.

None yet

2 participants