public class Multiplexer
extends java.util.Observable
implements java.lang.Runnable
anon.client.Multiplexer#run()}
,
anon.client.Multiplexer#sendPacket(MixPacket)}
,
anon.client.AbstractDataChannel}
,
anon.client.AbstractControlChannel}
Constructor and Description |
---|
Multiplexer(java.io.InputStream a_inputStream,
java.io.OutputStream a_outputStream,
KeyExchangeManager a_keyExchangeManager,
java.security.SecureRandom a_channelIdGenerator) |
Modifier and Type | Method and Description |
---|---|
ChannelTable |
getChannelTable() |
ControlChannelCipher |
getControlChannelCipher() |
boolean |
isDebug() |
boolean |
isProtocolWithIntegrityCheck() |
boolean |
isSendingControlMessage() |
void |
run()
This method continuously tries to read MixPackets from the
InputStream, deciphers them, checks their channel ID and relays the
packets to be processed by that channel.
|
void |
sendPacket(MixPacket a_mixPacket)
checks if this MixPacket could be sent right now, or if it needs to be
delayed because of the upstream flow control. in the later case the call
to this function will block until the packet could be sent.
|
public Multiplexer(java.io.InputStream a_inputStream, java.io.OutputStream a_outputStream, KeyExchangeManager a_keyExchangeManager, java.security.SecureRandom a_channelIdGenerator)
public boolean isSendingControlMessage()
public void sendPacket(MixPacket a_mixPacket) throws java.io.IOException
a_mixPacket
- the MixPacket in questionjava.io.IOException
public void run()
run
in interface java.lang.Runnable
public ChannelTable getChannelTable()
public ControlChannelCipher getControlChannelCipher()
public boolean isProtocolWithIntegrityCheck()
public boolean isDebug()
Copyright © 2023. All rights reserved.