-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core & plugin sources, plugin assets
- Loading branch information
Showing
2,954 changed files
with
799,303 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
~ This program is free software; you can redistribute it and/or | ||
~ modify it under the terms of the GNU General Public License | ||
~ as published by the Free Software Foundation; either version 2 | ||
~ of the License, or (at your option) any later version. | ||
~ | ||
~ This program is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
~ GNU General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU General Public License | ||
~ along with this program; if not, write to the Free Software | ||
~ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
--> | ||
|
||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:color="?android:attr/textColorPrimary"/> | ||
</selector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apply plugin: 'java-library' | ||
|
||
sourceSets { | ||
main { | ||
|
||
java { | ||
srcDirs = ['src','plugins'] | ||
} | ||
|
||
resources { | ||
includes = [ '**/*.properties' ] | ||
srcDirs = ['src','plugins'] | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
//noinspection GradleDependency | ||
compile 'commons-cli:commons-cli:1.4' | ||
} | ||
|
||
sourceCompatibility = "1.8" | ||
targetCompatibility = "1.8" |
155 changes: 155 additions & 0 deletions
155
core/plugins/com/aelitis/azureus/core/networkmanager/impl/utp/ProtocolEndpointUTP.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
/* | ||
* Created on Aug 28, 2010 | ||
* Created by Paul Gardner | ||
* | ||
* Copyright 2010 Vuze, Inc. All rights reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details ( see the LICENSE file ). | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
*/ | ||
|
||
|
||
|
||
package com.aelitis.azureus.core.networkmanager.impl.utp; | ||
|
||
import java.net.InetSocketAddress; | ||
import java.nio.ByteBuffer; | ||
|
||
import com.biglybt.core.util.AddressUtils; | ||
|
||
import com.biglybt.core.networkmanager.ConnectionEndpoint; | ||
import com.biglybt.core.networkmanager.ProtocolEndpoint; | ||
import com.biglybt.core.networkmanager.ProtocolEndpointFactory; | ||
import com.biglybt.core.networkmanager.ProtocolEndpointHandler; | ||
import com.biglybt.core.networkmanager.Transport; | ||
import com.biglybt.core.networkmanager.Transport.ConnectListener; | ||
|
||
public class | ||
ProtocolEndpointUTP | ||
implements ProtocolEndpoint | ||
{ | ||
private static UTPConnectionManager manager; | ||
|
||
public static void | ||
register( | ||
UTPConnectionManager _manager ) | ||
{ | ||
manager = _manager; | ||
|
||
ProtocolEndpointFactory.registerHandler( | ||
new ProtocolEndpointHandler() | ||
{ | ||
public int | ||
getType() | ||
{ | ||
return( ProtocolEndpoint.PROTOCOL_UTP ); | ||
} | ||
|
||
public ProtocolEndpoint | ||
create( | ||
InetSocketAddress address ) | ||
{ | ||
return( new ProtocolEndpointUTP( address )); | ||
} | ||
|
||
public ProtocolEndpoint | ||
create( | ||
ConnectionEndpoint connection_endpoint, | ||
InetSocketAddress address ) | ||
{ | ||
return( new ProtocolEndpointUTP( connection_endpoint, address )); | ||
} | ||
}); | ||
} | ||
|
||
private ConnectionEndpoint ce; | ||
private InetSocketAddress address; | ||
|
||
private | ||
ProtocolEndpointUTP( | ||
ConnectionEndpoint _ce, | ||
InetSocketAddress _address ) | ||
{ | ||
ce = _ce; | ||
address = _address; | ||
|
||
ce.addProtocol( this ); | ||
} | ||
|
||
private | ||
ProtocolEndpointUTP( | ||
InetSocketAddress _address ) | ||
{ | ||
ce = new ConnectionEndpoint(_address ); | ||
address = _address; | ||
|
||
ce.addProtocol( this ); | ||
} | ||
|
||
public void | ||
setConnectionEndpoint( | ||
ConnectionEndpoint _ce ) | ||
{ | ||
ce = _ce; | ||
|
||
ce.addProtocol( this ); | ||
} | ||
|
||
public int | ||
getType() | ||
{ | ||
return( PROTOCOL_UTP ); | ||
} | ||
|
||
public InetSocketAddress | ||
getAddress() | ||
{ | ||
return( address ); | ||
} | ||
|
||
public InetSocketAddress | ||
getAdjustedAddress( | ||
boolean to_lan ) | ||
{ | ||
return( AddressUtils.adjustTCPAddress( address, to_lan )); | ||
} | ||
|
||
public ConnectionEndpoint | ||
getConnectionEndpoint() | ||
{ | ||
return( ce ); | ||
} | ||
|
||
public Transport | ||
connectOutbound( | ||
boolean connect_with_crypto, | ||
boolean allow_fallback, | ||
byte[][] shared_secrets, | ||
ByteBuffer initial_data, | ||
int priority, | ||
ConnectListener listener ) | ||
{ | ||
UTPTransport t = new UTPTransport( manager, this, connect_with_crypto, allow_fallback, shared_secrets ); | ||
|
||
t.connectOutbound( initial_data, listener, priority ); | ||
|
||
return( t ); | ||
} | ||
|
||
public String | ||
getDescription() | ||
{ | ||
return( address.toString()); | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
core/plugins/com/aelitis/azureus/core/networkmanager/impl/utp/TransportEndpointUTP.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Created on 16 Jun 2006 | ||
* Created by Paul Gardner | ||
* Copyright (C) 2006 Aelitis, All Rights Reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
* | ||
* AELITIS, SAS au capital de 46,603.30 euros | ||
* 8 Allee Lenotre, La Grille Royale, 78600 Le Mesnil le Roi, France. | ||
* | ||
*/ | ||
|
||
package com.aelitis.azureus.core.networkmanager.impl.utp; | ||
|
||
import com.biglybt.core.networkmanager.ProtocolEndpoint; | ||
import com.biglybt.core.networkmanager.TransportEndpoint; | ||
|
||
public class | ||
TransportEndpointUTP | ||
implements TransportEndpoint | ||
{ | ||
private ProtocolEndpoint pe; | ||
|
||
public | ||
TransportEndpointUTP( | ||
ProtocolEndpoint _pe ) | ||
{ | ||
pe = _pe; | ||
} | ||
|
||
public ProtocolEndpoint | ||
getProtocolEndpoint() | ||
{ | ||
return( pe ); | ||
} | ||
} |
Oops, something went wrong.