|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object anon.mixminion.FirstMMRConnection
public class FirstMMRConnection
Field Summary | |
---|---|
private boolean |
m_bIsClosed
|
private int |
m_blocksize
|
private MMRDescription |
m_description
|
private long |
m_inittimeout
|
private java.io.InputStream |
m_istream
|
private Mixminion |
m_Mixminion
|
private java.io.OutputStream |
m_ostream
|
private java.lang.String |
m_protocol
|
private TinyTLS |
m_tinyTLS
|
private static java.lang.String |
OP_NAME
|
Constructor Summary | |
---|---|
FirstMMRConnection(MMRDescription d,
Mixminion a_Mixminion)
constructor creates a FOR from the description |
Method Summary | |
---|---|
void |
close()
closes the connection to the router |
void |
connect()
connects to the First MixminionRouter (MMR) |
private void |
createClientCert()
create client certificate for TinyTLS-connection |
MMRDescription |
getMMRDescription()
returns the description of the onion router |
boolean |
isClosed()
check if the connection to the first onion router is closed |
private boolean |
receive(byte[] message,
java.lang.String type)
check answer from server and message-hash possibel answers: RECEIVE, REJECTED |
boolean |
send(byte[] message)
connects to first MMR, sends a Message-packet and closes the connection |
private boolean |
sending(byte[] send,
java.lang.String sendtype)
sends a packet |
boolean |
sendJunk()
sends a Junk-packet |
boolean |
sendMessage(byte[] message)
sends a Message-packet |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.lang.String OP_NAME
private TinyTLS m_tinyTLS
private MMRDescription m_description
private java.io.InputStream m_istream
private java.io.OutputStream m_ostream
private java.lang.String m_protocol
private boolean m_bIsClosed
private long m_inittimeout
private Mixminion m_Mixminion
private int m_blocksize
Constructor Detail |
---|
public FirstMMRConnection(MMRDescription d, Mixminion a_Mixminion)
d
- description of the mixminion routera_Mixminion
- a Mixminion instanceMethod Detail |
---|
public MMRDescription getMMRDescription()
public boolean isClosed()
private boolean sending(byte[] send, java.lang.String sendtype) throws java.io.IOException
send
- 32k message as byte arraysendtype
- type of Packet - "Junk" or normal "SEND"
java.io.IOException
public boolean send(byte[] message) throws java.io.IOException
send
- 32k message as byte array
java.io.IOException
public boolean sendMessage(byte[] message) throws java.io.IOException
send
- 32k message as byte array
java.io.IOException
public boolean sendJunk() throws java.io.IOException
java.io.IOException
private boolean receive(byte[] message, java.lang.String type)
message
- 32k Messagetype
- "RECEIVED JUNK" or "RECEIVED"
private void createClientCert()
public void connect() throws java.lang.Exception
java.lang.Exception
public void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |