It is currently Wed Jun 19, 2013 8:29 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Size of file sending by SendNetworkData [Resolved]
PostPosted: Wed Apr 11, 2012 8:42 am 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 2531
Location: Lyon - France
Hello at all

I want just to know if there are a limit for the size of the file sending with SendNetworkData ???

For the moment, that's works with 5 mb, but i want to be sure this simple method is safe 8)
For example, can i sending a full movie of 650 Mb with this simple code, or i'm forcing to cut the movie in several piece for sending it ??
Code:
File.s = "The ReturnOfKCC.avi"
FileSize = FileSize(File)
Buffer = AllocateMemory(FileSize)
SendNetworkData(ID, Buffer, FileSize)


Thanks and good day

_________________
ImageThe happiness is a road...
Not a destination


Last edited by Kwaï chang caïne on Wed Apr 11, 2012 2:06 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Size of file sending by SendNetworkData
PostPosted: Wed Apr 11, 2012 10:04 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Jan 10, 2008 1:30 pm
Posts: 720
Location: Germany, Glienicke
no you can not,

max buffer size of you network send buffer (in windows, not in PB) is ~128MB (in my system)
So you must send it in blocks.

btw: you do not allocate 650MB in you RAM, or?

_________________
Image


Top
 Profile  
 
 Post subject: Re: Size of file sending by SendNetworkData
PostPosted: Wed Apr 11, 2012 11:32 am 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 2531
Location: Lyon - France
Thanks a lot STARGATE for your answer.
Now thanks to you, i know i must cut my big file. 8)

Quote:
is ~128MB (in my system)
How you find this number, for be sure use the better (not too big, not too small) ????
Because i suppose all the system is not the same ????

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
 
 Post subject: Re: Size of file sending by SendNetworkData
PostPosted: Wed Apr 11, 2012 1:58 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Jan 10, 2008 1:30 pm
Posts: 720
Location: Germany, Glienicke
Note:
SendDataNetwork sends the data not to the other, only into the transmit buffer of the network card, the buffer size is somewhere in your system configuration, or you have to try it yourself.
If SendNetworkData returns -1, the data is to long :wink:

It is recommended in any case that you send only small blocks, and then waiting of a feedback from the other, whether it has arrived, and then send the next.

the PB help say TCP (over netzwork) can send/receive 65KB per transmission.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Size of file sending by SendNetworkData
PostPosted: Wed Apr 11, 2012 2:06 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 2531
Location: Lyon - France
Thanks a lot STARGATE, with your precious help i can continue in the good way
I wish you a very good day 8)

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye