Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 5-Jan-2014 04:20:55

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,477
Website

netSendFile project

I'd like to write the code for sending a .zip file containing a .mesh and its dependencies to other clients to load as os3d resources. How would I do this? Pseudo code can get me started.

Offline

#2 5-Jan-2014 12:53:42

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: netSendFile project

xos file and its dependencies are already known by os3d, no ? They are loaded in the first client (the sender).
Otherwise, parsing the mesh file ...
To send, there are the DMSsend and co functions. Arkeon has probably renamed these functions to include them better in os3d, he will tell it you. Else, in a lower level, you can directly send a Comm object (_on it is not really difficult even if you have never done that).
For zip, i wrote too this API but the syspack library is required on the clients.

Offline

#3 5-Jan-2014 15:02:06

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,091
Website

Re: netSendFile project

Hi !

there is the netSendFile / netGetFile functions in the OS3D net API
http://redmine.scolring.org/projects/op … b06cab42c6

you define the file callback with netSetCbGetFile, the arguments are [netstr userstr cmd (webtostr message) arg]

when a user connect or change is avatar he should send the new file with netSendFile

but in your case to make sure new clents get the avatars from already connected users you can set the avatar file name in a user item.

when a user get the other user items value with the filename he can request the file directly with netGetFile

Offline

#4 5-Jan-2014 15:02:17

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,477
Website

Re: netSendFile project

Thx Iri and arkeon. Could one of you guys write the psuedo code that does this:

a code block which sends mesh.zip, which contains mesh.mesh, mesh.skeleton, mesh.material, and mesh.jpg, then

a code block that unpacks the .zip

with those two code blocks I think I can build the rest with little help.

Last edited by hebdemnobad (5-Jan-2014 15:28:15)

Offline

Board footer

Powered by FluxBB