Class SESTSConnectionImpl
java.lang.Object
com.biglybt.pifimpl.local.utils.security.SESTSConnectionImpl
- All Implemented Interfaces:
GenericMessageConnection
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.biglybt.pif.messaging.generic.GenericMessageConnection
GenericMessageConnection.GenericMessageConnectionPropertyHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]
private static final byte[]
private final int
private int
private static final int
private static final int
private GenericMessageConnectionImpl
private static List<SESTSConnectionImpl>
private Core
private long
private AESemaphore
private static final int
private static AsyncDispatcher
private boolean
private static BloomFilter
private static long
private Cipher
private SEPublicKeyLocator
private static final LogIDs
private SEPublicKey
private Cipher
private PooledByteBuffer
private String
private boolean
private boolean
private CryptoSTSEngine
Fields inherited from interface com.biglybt.pif.messaging.generic.GenericMessageConnection
TT_INDIRECT, TT_NONE, TT_TCP, TT_UDP
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SESTSConnectionImpl
(Core _core, GenericMessageConnectionImpl _connection, SEPublicKey _my_public_key, SEPublicKeyLocator _key_locator, String _reason, int _block_crypto) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInboundRateLimiter
(RateLimiter limiter) void
addListener
(GenericMessageConnectionListener listener) void
addOutboundRateLimiter
(RateLimiter limiter) void
close()
void
protected void
protected int
int
int
getType()
protected static void
rateLimit
(InetSocketAddress originator) void
receive
(PooledByteBuffer message) protected void
receiveContent
(PooledByteBuffer message) void
removeInboundRateLimiter
(RateLimiter limiter) void
void
removeOutboundRateLimiter
(RateLimiter limiter) protected void
protected void
reportFailed
(Throwable error) void
send
(PooledByteBuffer message) protected void
sendContent
(PooledByteBuffer message) protected void
protected void
-
Field Details
-
CRYPTO_SETUP_TIMEOUT
private static final int CRYPTO_SETUP_TIMEOUT- See Also:
-
LOGID
-
AES_IV1
private static final byte[] AES_IV1 -
AES_IV2
private static final byte[] AES_IV2 -
AES_KEY_SIZE_BYTES
private final int AES_KEY_SIZE_BYTES -
connections
-
dispatcher
-
BLOOM_RECREATE
private static final int BLOOM_RECREATE- See Also:
-
BLOOM_INCREASE
private static final int BLOOM_INCREASE- See Also:
-
generate_bloom
-
generate_bloom_create_time
private static long generate_bloom_create_time -
core
-
connection
-
my_public_key
-
key_locator
-
reason
-
block_crypto
private int block_crypto -
create_time
private long create_time -
sts_engine
-
listeners
-
sent_keys
private boolean sent_keys -
sent_auth
private boolean sent_auth -
pending_message
-
crypto_complete
-
outgoing_cipher
-
incoming_cipher
-
failed
private volatile boolean failed
-
-
Constructor Details
-
SESTSConnectionImpl
protected SESTSConnectionImpl(Core _core, GenericMessageConnectionImpl _connection, SEPublicKey _my_public_key, SEPublicKeyLocator _key_locator, String _reason, int _block_crypto) throws Exception - Throws:
Exception
-
-
Method Details
-
getStartpoint
- Specified by:
getStartpoint
in interfaceGenericMessageConnection
- Returns:
- may be null if unknown
-
getConnection
- Specified by:
getConnection
in interfaceGenericMessageConnection
-
getConnectMethodCount
protected int getConnectMethodCount() -
rateLimit
- Throws:
Exception
-
getEndpoint
- Specified by:
getEndpoint
in interfaceGenericMessageConnection
-
getMaximumMessageSize
public int getMaximumMessageSize()- Specified by:
getMaximumMessageSize
in interfaceGenericMessageConnection
-
getType
- Specified by:
getType
in interfaceGenericMessageConnection
-
getTransportType
public int getTransportType()- Specified by:
getTransportType
in interfaceGenericMessageConnection
-
addInboundRateLimiter
- Specified by:
addInboundRateLimiter
in interfaceGenericMessageConnection
-
removeInboundRateLimiter
- Specified by:
removeInboundRateLimiter
in interfaceGenericMessageConnection
-
addOutboundRateLimiter
- Specified by:
addOutboundRateLimiter
in interfaceGenericMessageConnection
-
removeOutboundRateLimiter
- Specified by:
removeOutboundRateLimiter
in interfaceGenericMessageConnection
-
connect
public void connect(GenericMessageConnection.GenericMessageConnectionPropertyHandler ph) throws MessageException - Specified by:
connect
in interfaceGenericMessageConnection
- Throws:
MessageException
-
setFailed
protected void setFailed() -
receive
- Throws:
MessageException
-
setupBlockCrypto
- Throws:
MessageException
-
cryptoComplete
- Throws:
MessageException
-
send
- Specified by:
send
in interfaceGenericMessageConnection
- Throws:
MessageException
-
sendContent
- Throws:
MessageException
-
receiveContent
- Throws:
MessageException
-
close
- Specified by:
close
in interfaceGenericMessageConnection
- Throws:
MessageException
-
reportConnected
protected void reportConnected() -
reportFailed
-
addListener
- Specified by:
addListener
in interfaceGenericMessageConnection
-
removeListener
- Specified by:
removeListener
in interfaceGenericMessageConnection
-