| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmail.communication.inet.UDP
public class UDP
| Nested Class Summary | |
|---|---|
| static class | UDP.UDPException | 
| Field Summary | |
|---|---|
| (package private)  int | anz | 
| (package private)  java.util.HashSet<java.lang.Integer> | arrive | 
| static int | CPACKAGEThe UDP packet contains a CPackage -> there may be more packages following | 
| static int | CPACKAGE_HEADER | 
| (package private)  long | creation | 
| (package private)  byte[] | data | 
| static int | DISCARD_TIMEthe time after which missing UDP-packets are considered lost | 
| static int | ECHOcontent for PING : ECHO package received | 
| static int | HOLE_PUNCH_REQUESTThe UDP packet is a hole punch request | 
| (package private)  byte[] | id | 
| static int | IP_REQUESTcontent for PING : want to know my IP | 
| static int | IPv4the used IP-Address is of type IPv4 | 
| static int | IPv6the used IP-Address is of type IPv6 | 
| static int | NO_REPLYcontent for PING : no package received | 
| static int | PINGThe UDP packet is a ping OR: content for PING : PING package received | 
| (package private)  int | port | 
| static int | PUNCH_HOLEThe UDP packet is a command to punch a UDP hole | 
| static int | PUNCH_PERFORMEDcontent for PING : punch was performed | 
| static int | PUNCH_REJECTEDcontent for PING : punch will not be performed | 
| private static java.util.Random | random | 
| static int | REQUEST_FAILEDcontent for PING : punch request failed to have any effect | 
| static int | REQUEST_PERFORMEDcontent for PING : punch request will be performed | 
| (package private)  java.net.InetAddress | sender | 
| static int | SPLIT_SIZEthe max. size in bytes of created UDP-Packets | 
| (package private)  int | type | 
| static int | UNSUPPORTEDReply to an unsupported package type | 
| static int | YOUR_IPThe UDP packet is the answer to an IP request | 
| Constructor Summary | |
|---|---|
| UDP(java.net.DatagramPacket dp) | |
| Method Summary | |
|---|---|
|  void | add(java.net.DatagramPacket dp) | 
| static java.net.DatagramPacket[] | build(byte[] out,
      InetAddress address)split a given byte[] into DatagramPackets | 
| static java.net.DatagramPacket | build(int type,
      InetAddress address,
      InetAddress action) | 
|  boolean | finished() | 
|  InetAddress | getActionAddress() | 
|  java.io.InputStream | getInput() | 
|  int | getResponse() | 
|  InetAddress | getSender() | 
|  int | getType() | 
| static java.net.DatagramPacket | ping(int echo,
     InetAddress address)sends a ping, or answers a ping. | 
|  boolean | tooOld() | 
|  java.lang.String | toString() | 
| static java.net.DatagramPacket | unsupported(UDP unsupported) | 
|  boolean | useable(java.net.DatagramPacket dp) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final int SPLIT_SIZE
public static final int CPACKAGE_HEADER
public static final int UNSUPPORTED
public static final int CPACKAGE
public static final int PING
public static final int HOLE_PUNCH_REQUEST
public static final int PUNCH_HOLE
public static final int YOUR_IP
public static final int IPv4
public static final int IPv6
public static final int NO_REPLY
public static final int ECHO
public static final int PUNCH_PERFORMED
public static final int PUNCH_REJECTED
public static final int REQUEST_PERFORMED
public static final int REQUEST_FAILED
public static final int IP_REQUEST
public static final int DISCARD_TIME
private static final java.util.Random random
int type
byte[] data
java.net.InetAddress sender
int port
long creation
byte[] id
int anz
java.util.HashSet<java.lang.Integer> arrive
| Constructor Detail | 
|---|
public UDP(java.net.DatagramPacket dp)
| Method Detail | 
|---|
public static java.net.DatagramPacket[] build(byte[] out,
                                              InetAddress address)
out - the byte[] to splitaddress - the address to encode into the DatagramPacketS
public static java.net.DatagramPacket ping(int echo,
                                           InetAddress address)
echo - either ECHO or PING, use ECHO as response for PING + Responses for UDP-Hole-Punchingaddress - 
public static java.net.DatagramPacket build(int type,
                                            InetAddress address,
                                            InetAddress action)
                                     throws UDP.UDPException
UDP.UDPExceptionpublic static java.net.DatagramPacket unsupported(UDP unsupported)
public boolean tooOld()
public void add(java.net.DatagramPacket dp)
         throws UDP.UDPException
UDP.UDPExceptionpublic boolean useable(java.net.DatagramPacket dp)
public boolean finished()
public java.io.InputStream getInput()
                             throws UDP.UDPException
UDP.UDPExceptionpublic int getType()
public InetAddress getSender()
public InetAddress getActionAddress()
                             throws UDP.UDPException
UDP.UDPException
public int getResponse()
                throws UDP.UDPException
UDP.UDPExceptionpublic java.lang.String toString()
toString in class java.lang.Object| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||