Java Code Examples for net.fs.rudp.Route#localUploadSpeed()

The following examples show how to use net.fs.rudp.Route#localUploadSpeed() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClientUI.java    From NSS with Apache License 2.0 5 votes vote down vote up
void setSpeed(int downloadSpeed, int uploadSpeed) {
    config.setDownloadSpeed(downloadSpeed);
    config.setUploadSpeed(uploadSpeed);
    int s1 = (int) ((float) downloadSpeed * 1.1f);
    text_ds.setText(" " + Tools.getSizeStringKB(s1) + "/s ");
    int s2 = (int) ((float) uploadSpeed * 1.1f);
    text_us.setText(" " + Tools.getSizeStringKB(s2) + "/s ");
    Route.localDownloadSpeed = downloadSpeed;
    Route.localUploadSpeed = config.uploadSpeed;

    saveConfig();
}
 
Example 2
Source File: ClientNoUI.java    From NSS with Apache License 2.0 5 votes vote down vote up
ClientNoUI() throws Exception {
		loadConfig();
		Route.localDownloadSpeed=config.downloadSpeed;
		Route.localUploadSpeed=config.uploadSpeed;

		//mapClient=new MapClient(config.getSocks5Port(),false);
//		mapClient.setUi(this);
//		mapClient.setMapServer(config.getServerAddress(), config.getServerPort(),config.getRemotePort()	,config.getPasswordMd5(),config.getPasswordMd5_Proxy(),config.isDirect_cn(),false,"");
	}
 
Example 3
Source File: ClientUI.java    From finalspeed-91yun with GNU General Public License v2.0 5 votes vote down vote up
void setSpeed(int downloadSpeed, int uploadSpeed) {
    config.setDownloadSpeed(downloadSpeed);
    config.setUploadSpeed(uploadSpeed);
    int s1 = (int) ((float) downloadSpeed * 1.1f);
    text_ds.setText(" " + Tools.getSizeStringKB(s1) + "/s ");
    int s2 = (int) ((float) uploadSpeed * 1.1f);
    text_us.setText(" " + Tools.getSizeStringKB(s2) + "/s ");
    Route.localDownloadSpeed = downloadSpeed;
    Route.localUploadSpeed = config.uploadSpeed;

    saveConfig();
}
 
Example 4
Source File: ClientNoUI.java    From finalspeed-91yun with GNU General Public License v2.0 5 votes vote down vote up
ClientNoUI(){
		loadConfig();
		Route.localDownloadSpeed=config.downloadSpeed;
		Route.localUploadSpeed=config.uploadSpeed;
//		mapClient=new MapClient(config.getSocks5Port());
//		mapClient.setUi(this);
//		mapClient.setMapServer(config.getServerAddress(), config.getServerPort(),config.getRemotePort()	,config.getPasswordMd5(),config.getPasswordMd5_Proxy(),config.isDirect_cn());
	}
 
Example 5
Source File: ClientUI.java    From finalspeed with GNU General Public License v2.0 5 votes vote down vote up
void setSpeed(int downloadSpeed, int uploadSpeed) {
    config.setDownloadSpeed(downloadSpeed);
    config.setUploadSpeed(uploadSpeed);
    int s1 = (int) ((float) downloadSpeed * 1.1f);
    text_ds.setText(" " + Tools.getSizeStringKB(s1) + "/s ");
    int s2 = (int) ((float) uploadSpeed * 1.1f);
    text_us.setText(" " + Tools.getSizeStringKB(s2) + "/s ");
    Route.localDownloadSpeed = downloadSpeed;
    Route.localUploadSpeed = config.uploadSpeed;

    saveConfig();
}
 
Example 6
Source File: ClientNoUI.java    From finalspeed with GNU General Public License v2.0 5 votes vote down vote up
ClientNoUI() {
        loadConfig();
        Route.localDownloadSpeed = config.downloadSpeed;
        Route.localUploadSpeed = config.uploadSpeed;
//		mapClient=new MapClient(config.getSocks5Port());
//		mapClient.setUi(this);
//		mapClient.setMapServer(config.getServerAddress(), config.getServerPort(),config.getRemotePort()	,config
// .getPasswordMd5(),config.getPasswordMd5_Proxy(),config.isDirect_cn());
    }