/* Source code made by iri This code is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. You can do what you want with it */ // ALICE defcom commToBob = reply S;; // sent datas are an integer and two strings typeof server = Srv;; // server to receive all messages fun createServer ()= // we keep the current environment and open the port 3500. No script will be executed when a connection occurs (nil) set server = _setserver _envchannel _channel 3500 nil; _fooS if server == nil then "Unable to create a server, the port is probably busy" else "Server created"; 0;; fun main ()= _showconsole; _fooS "My name is ALICE"; createServer; // Alice create his Scol server 0;; // Function called when a message from Bob has been sent with the communication "commToAlice" fun __funHello (integer, string_1, string_2)= _fooId integer; _fooS string_1; _fooS string_2; /* Alice answers to Bob. Note that the channel _channel is the channel between Bob and Alice (because this function has been called in this channel and not the Alice channel. Be careful !) */ _on _channel commToBob ["OK, I'll wait !"]; // reply ... 0;;