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 GenericMessageConnection
GenericMessageConnection.GenericMessageConnectionPropertyHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]private static final byte[]private final intprivate intprivate static final intprivate static final intprivate booleanprivate GenericMessageConnectionImplprivate static List<SESTSConnectionImpl> private Coreprivate final longprivate AESemaphoreprivate static final intprivate static AsyncDispatcherprivate booleanprivate static BloomFilterprivate static longprivate Cipherprivate SEPublicKeyLocatorprivate static final LogIDsprivate SEPublicKeyprivate Cipherprivate PooledByteBufferprivate Stringprivate booleanprivate booleanprivate CryptoSTSEngineFields inherited from interface GenericMessageConnection
TT_INDIRECT, TT_NONE, TT_TCP, TT_UDP -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSESTSConnectionImpl(Core _core, GenericMessageConnectionImpl _connection, SEPublicKey _my_public_key, SEPublicKeyLocator _key_locator, String _reason, int _block_crypto) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInboundRateLimiter(RateLimiter limiter) voidaddListener(GenericMessageConnectionListener listener) voidaddOutboundRateLimiter(RateLimiter limiter) voidclose()voidprotected voidprotected intintintgetType()protected static voidrateLimit(InetSocketAddress originator) voidreceive(PooledByteBuffer message) protected voidreceiveContent(PooledByteBuffer message) voidremoveInboundRateLimiter(RateLimiter limiter) voidvoidremoveOutboundRateLimiter(RateLimiter limiter) protected voidprotected voidreportFailed(Throwable error) voidsend(PooledByteBuffer message) protected voidsendContent(PooledByteBuffer message) protected voidprotected 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_mono
private static long generate_bloom_create_time_mono -
core
-
connection
-
my_public_key
-
key_locator
-
reason
-
block_crypto
private int block_crypto -
create_time_mono
private final long create_time_mono -
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 -
closed
private volatile boolean closed
-
-
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:
getStartpointin interfaceGenericMessageConnection- Returns:
- may be null if unknown
-
getConnection
- Specified by:
getConnectionin interfaceGenericMessageConnection
-
getConnectMethodCount
protected int getConnectMethodCount() -
rateLimit
- Throws:
Exception
-
getEndpoint
- Specified by:
getEndpointin interfaceGenericMessageConnection
-
getMaximumMessageSize
public int getMaximumMessageSize()- Specified by:
getMaximumMessageSizein interfaceGenericMessageConnection
-
getType
- Specified by:
getTypein interfaceGenericMessageConnection
-
getTransportType
public int getTransportType()- Specified by:
getTransportTypein interfaceGenericMessageConnection
-
addInboundRateLimiter
- Specified by:
addInboundRateLimiterin interfaceGenericMessageConnection
-
removeInboundRateLimiter
- Specified by:
removeInboundRateLimiterin interfaceGenericMessageConnection
-
addOutboundRateLimiter
- Specified by:
addOutboundRateLimiterin interfaceGenericMessageConnection
-
removeOutboundRateLimiter
- Specified by:
removeOutboundRateLimiterin interfaceGenericMessageConnection
-
connect
public void connect(GenericMessageConnection.GenericMessageConnectionPropertyHandler ph) throws MessageException - Specified by:
connectin interfaceGenericMessageConnection- Throws:
MessageException
-
setFailed
protected void setFailed() -
receive
- Throws:
MessageException
-
setupBlockCrypto
- Throws:
MessageException
-
cryptoComplete
- Throws:
MessageException
-
send
- Specified by:
sendin interfaceGenericMessageConnection- Throws:
MessageException
-
sendContent
- Throws:
MessageException
-
receiveContent
- Throws:
MessageException
-
close
- Specified by:
closein interfaceGenericMessageConnection- Throws:
MessageException
-
reportConnected
protected void reportConnected() -
reportFailed
-
addListener
- Specified by:
addListenerin interfaceGenericMessageConnection
-
removeListener
- Specified by:
removeListenerin interfaceGenericMessageConnection
-