How can I exchange files instead of messages between nodes?

10 views
Skip to first unread message

Hoda

unread,
Nov 7, 2009, 9:52:49 AM11/7/09
to OversimGoogleGroup, OmnetGoogleGroup
Hi
 
Is anyone know how can I exchange a file (ex. image file like jpg,..) between nodes of the network instead of  a message (msg.m)?
 
Please help me through this

Thanks,

--
Hoda

Peter Staab

unread,
Nov 7, 2009, 10:00:24 AM11/7/09
to omn...@googlegroups.com
Hi,

That's quite easy:
1) either load the file into a char buffer and attach it to the message
(with a variable)
2) or create a class that represents the file and define a variable with
the type of the class in the message.

So, conceptionally you cannot "just" send a file between nodes. You must
use some technique/protocol like e.g. ftp. And such a protocol uses
packets (messages) to transfer data between nodes.

I hope that helps,




Hoda schrieb:

Hoda

unread,
Nov 7, 2009, 2:10:33 PM11/7/09
to OmnetGoogleGroup
Thanks for your reply.
 
Actually my file is a video file and I intend to implement it in a P2P network. each peer has several frame of it and exchange their available frames with other peers that required them.
The data in each frame (each frame is an image file) is stored in a large 2Dim-Matrix and the column and row numbers is high. For implementing the P2P network I'm using oversim.
I'm new to these simulation environments, so would you please tell me how should I use the ftp protocol for it and where I can get a code of this protocol?
 
Thanks,

--
Hoda
Reply all
Reply to author
Forward
0 new messages