How To Program in Obol
Obol scripts tend to follow a similar pattern, but the only real restriction are dependencies; specifically, inputs must be specified by [input] statements before being used. Any mention of "application" refers to the software using the Obol runtime or a particular script.
<b>(a)</b> (script "Server" [input portNo number] [returns data string] [self portNo default :poolmode] [format default] (receive *client *data) (believe data *data ((type string)))) <b>(b)</b> (script "Client" [input portNo number] (believe data "Hello World!") (believe server "127.0.0.1" ((port portNo))) (send server data)) Here is a "Hello World" type client-server pair showing the aforementioned pattern for (a) server; (b) client. |