M
Max
Hello ,
I have builded ServerSide Socket with Java and ClientSocket still in Java
(applet) .
The Client send very amouth of data to server (1Mbyte, 3Mbyte) .
Now , I need to limit the bandwidth that Applet client can transfer to
server .
Example :
- 30 KByte/s
- 50 KByte/s
The client can't send more that 30KByte/s to server , example .
In order to do this , I think that there are only one solution :
1 - buffer the data in great byte[] array that store ALL data that client
must send!
2 - send the first 30KByte buffered
3 - use Thread.sleep(1000)
4 - send the NEXT 30KByte buffered
5 - repet from [4]
6 - byte[] array is totally send , finish...
Before starting to write this , i want to ask if there are other solutions .
Thanks a lot for any suggestions ...
Best Regard,
max
I have builded ServerSide Socket with Java and ClientSocket still in Java
(applet) .
The Client send very amouth of data to server (1Mbyte, 3Mbyte) .
Now , I need to limit the bandwidth that Applet client can transfer to
server .
Example :
- 30 KByte/s
- 50 KByte/s
The client can't send more that 30KByte/s to server , example .
In order to do this , I think that there are only one solution :
1 - buffer the data in great byte[] array that store ALL data that client
must send!
2 - send the first 30KByte buffered
3 - use Thread.sleep(1000)
4 - send the NEXT 30KByte buffered
5 - repet from [4]
6 - byte[] array is totally send , finish...
Before starting to write this , i want to ask if there are other solutions .
Thanks a lot for any suggestions ...
Best Regard,
max