Skip to content

Commit

Permalink
Merge pull request BelaPlatform#4 from brianlheim/lcidwr/docs
Browse files Browse the repository at this point in the history
Add documentation for changes
  • Loading branch information
Alberto de Campo authored Dec 14, 2017
2 parents 7cda61b + 301d274 commit 584ac13
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
24 changes: 19 additions & 5 deletions HelpSource/Classes/Server.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,24 @@ s.postln; // internal
subsection::Accessing all servers

method:: all
get a link::Classes/Set:: of all servers
returns:: a link::Classes/Set:: containing all servers.

code::
Server.all
::

method:: allRunningServers
returns:: the set of all running servers.
returns:: a Set containing all running servers, according to the definition of link::#-serverRunning::.

code::
Server.allRunningServers
::

method:: allBootedServers
returns:: a Set containing all booted servers, according to the definition of link::#-hasBooted::.

method:: named
get an link::Classes/IdentityDictionary:: of all servers listed by their name
returns:: An link::Classes/IdentityDictionary:: of all servers listed by their name

code::
Server.named.at(\default)
Expand Down Expand Up @@ -137,7 +140,7 @@ Switches the server program to scsynth. This is the default server.

InstanceMethods::

private:: doSend
private:: doSend, prHandleClientLoginInfoFromServer, prHandleNotifyFailString, prPingApp

method:: sendMsg
send an OSC-message to the server.
Expand Down Expand Up @@ -350,15 +353,26 @@ Get process ID of running server (if not internal).
method:: addr
The network address of the server as a link::Classes/NetAddr::.

method:: maxNumClients
If known, the maximum number of clients allowed on the server. Otherwise, the value of link::Classes/ServerOptions#-maxLogins::, which is what will be requested after the server boots. This number is not guaranteed to be correct until link::#-serverRunning:: is code::true::.

method:: clientID
The getter returns the client ID of this client on the remote process. code::nil:: until the server is running.

The setter attempts to set the client ID of this client for the remote server process. Fails on invalid input or if the server is running. Valid inputs are in the range code::[0..(this.maxNumClients-1)]::.

method:: hasShmInterface
Returns true if a link::Classes/ServerShmInterface:: is available. See also link::Classes/Bus#Synchronous control bus methods::.
The shared memory interface is initialized after first server boot.

method:: serverBooting
code::true:: if the server is booting, code::false:: otherwise.

method:: hasBooted
code::true:: if the server has booted. The server is not guaranteed to have a correct clientID, nor is it guaranteed that actions in link::Classes/ServerTree:: will have run yet.

method:: serverRunning
code::true:: if the server is running, code::false:: otherwise.
code::true:: only if the server is fully ready. A server is fully ready once it has booted, received a reply to a code::/notify:: command, been given a client ID, and after the link::Classes/ServerTree:: has run.

method:: unresponsive
code::true:: if the server is unresponsive (specifically, if it has failed to respond after link::Classes/ServerOptions#-pingsBeforeConsideredDead:: ping attempts); code::false:: otherwise.
Expand Down
7 changes: 4 additions & 3 deletions HelpSource/Reference/Server-Command-Reference.schelp
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ definitionlist::
subsection:: /notify
Register to receive notifications from server
table::
## strong::int:: || one to receive notifications, zero to stop receiving them.
## strong::int:: || 1 to receive notifications, 0 to stop receiving them.
## strong::int:: || client ID (optional)
::
If argument is one, server will remember your return address and send you notifications. if argument is zero, server will stop sending you notifications.
If the first argument is 1, server will remember your return address and send you notifications; if 0, server will stop sending notifications.

definitionlist::
## Asynchronous. || Replies to sender with strong::/done /notify clientID:: when complete. If this client has registered for notifications before, this may be the same ID. Otherwise it will be a new one. Clients can use this ID in multi-client situations to avoid conflicts in node IDs, bus indices, buffer numbers, etc.
## Asynchronous. || Replies to sender with strong::/done /notify clientID [maxLogins]:: when complete. If this client has registered for notifications before, this may be the same ID. Otherwise it will be a new one. Clients can use this ID in multi-client situations to avoid conflicts when allocating resources such as node IDs, bus indices, and buffer numbers. strong::maxLogins:: is only returned when the client ID argument is supplied in this command. strong::maxLogins:: is not supported by supernova.
::

subsection:: /status
Expand Down

0 comments on commit 584ac13

Please sign in to comment.