Rice Pastry API

org.mpisws.p2p.testing.transportlayer
Class MagicNumberTest

java.lang.Object
  extended by org.mpisws.p2p.testing.transportlayer.TLTest<java.net.InetSocketAddress>
      extended by org.mpisws.p2p.testing.transportlayer.WireTest
          extended by org.mpisws.p2p.testing.transportlayer.MagicNumberTest

public class MagicNumberTest
extends WireTest


Field Summary
static byte[] BAD_HDR
          Goes to Carol
static byte[] GOOD_HDR
          Goes to Alice/Bob
static byte[] NO_HDR
          Goes to Dave
 
Constructor Summary
MagicNumberTest()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static void setUpBeforeClass()
           
 void stallTCP()
          3 parts: - Dave opens a TCP socket to Bob but withholds the HEADER - Bob closes the Socket
 void wrongHeaderTCP()
          3 parts: - Alice opens a TCP socket to Bob - Alice sends to Bob - Alice closes the Socket
 void wrongHeaderUDP()
          Sends udp message from alice to carol, should fail.
 
Methods inherited from class org.mpisws.p2p.testing.transportlayer.WireTest
bogus, getBogusIdentifier
 
Methods inherited from class org.mpisws.p2p.testing.transportlayer.TLTest
getIdentifier, messageTooBigUDP, noCallbackTest, openTCP, sendUDP, tearDownAfterClass, testSocketThreadSafety
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GOOD_HDR

public static final byte[] GOOD_HDR
Goes to Alice/Bob


BAD_HDR

public static final byte[] BAD_HDR
Goes to Carol


NO_HDR

public static final byte[] NO_HDR
Goes to Dave

Constructor Detail

MagicNumberTest

public MagicNumberTest()
Method Detail

setUpBeforeClass

public static void setUpBeforeClass()
                             throws java.lang.Exception
Throws:
java.lang.Exception

wrongHeaderTCP

public void wrongHeaderTCP()
                    throws java.lang.Exception
3 parts: - Alice opens a TCP socket to Bob - Alice sends to Bob - Alice closes the Socket

Throws:
java.lang.Exception

stallTCP

public void stallTCP()
              throws java.lang.Exception
3 parts: - Dave opens a TCP socket to Bob but withholds the HEADER - Bob closes the Socket

Throws:
java.lang.Exception

wrongHeaderUDP

public void wrongHeaderUDP()
                    throws java.lang.Throwable
Sends udp message from alice to carol, should fail.

Throws:
java.lang.Throwable

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Parameters:
args -
Throws:
java.lang.Exception

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection