de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 RFC - communication
PostPosted: Thu Feb 05, 2015 6:22 pm 
Offline
Site Admin
User avatar
Request for comments. There were previously some discussions about communication for scripts. A lot of things are possible, but here are some first points :
- it'll be asynchronous, i.e. some data will be left on the server for others to use
- it'll be easy to use this in scripts

I have a 2 parts proposal

Part 1 : simple data
Adding a function isConnected(), returning true the communication is possible.
Adding a function send("name", value), similar to save("..",..)
Adding some functions receiveInteger("name"), receiveString("name")... similar to loadInteger("..",..)...

The idea is having a common properties file similar to the existing local properties file. But what it saved by a user can be read by another.

Part 2 : files
Probably something about pictures. Security involved. To be completed.


Top
 Profile Send private message 
 
 Re: RFC - communication
PostPosted: Tue Feb 17, 2015 1:59 am 
Offline
Site Admin
User avatar
Part 2 : files
Adding a function sendImage(filename), returning a random code (or null if failed)
Adding a function receiveImage(code), returning the local filename of the received picture (or null if failed)

Sample code 1 : community vote about something
Code:
def v = getInteger("What is your vote (1..10) ?", 5)
def nb = receiveInteger("thisscript.vote.nb")
def sum = receiveInteger("thisscript.vote.sum")
if(nb==null) {
  nb = 0
  sum = 0
}
nb += 1
sum += v
send("thisscript.vote.nb", nb)
send("thisscript.vote.sum", sum)
show("Average is "+(sum/nb))


Sample code 2 : send a picture, show a random picture sent before by anybody
Code:
def code = sendImage(getFile("Select a picture"))
def codes = receive("thiscript.codes")
if(codes==null)
  codes = code
else
  codes = codes+","+code
send("thiscript.codes",codes)
def codeList = codes.tokenize(",")
def code = codeList[getRandom(codeList.size())]
setImage(receiveImage("thiscript.codes"))


Comments still requested


Top
 Profile Send private message 
 
 Re: RFC - communication
PostPosted: Thu Mar 12, 2015 6:07 pm 
Offline
Site Admin
User avatar
Roadmap in a few days :
  • Implementation
  • Publication of SexScript 1.18
  • A test script


Top
 Profile Send private message 
 
 Re: RFC - communication
PostPosted: Fri Dec 25, 2015 7:50 pm 
Offline
Site Admin
User avatar
For privacy and online storage savings : after a while, when a picture is never read, its quality is reduced (to a pixellated blur).


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.