Class Server2

java.lang.Object
   |
   +----Server2

public class Server2
extends Object

Method Index

 o Check3or4Arg(int)
Check3or4Arg - Returns 0 if the next token is a tag.
 o getSDPVector()
Name: getSDPVector Purpose: Returns the sdp vector.
 o HandleMDirty()
HandleMDirty - If aString has anything remove it; otherwise mark mString as dirty.
 o initStreamTokenizer()
initStreamTokenizer - Initializes the whitespace and wordchars of the streamTokenizer.
 o IsNumber(String)
IsNumber - Returns 1 if the strPort is a number and between 0 and 100000; otherwise 0.
 o MakeConnection()
Name: MakeConnection Purpose: Connects the client to a good socket.
 o ParseA()
ParseA - Returns 1 if the line with tag a= parsed correctly; Otherwise 0.
 o ParseM()
ParseM - Returns 1 if the line with tag m= parsed correctly; Otherwise 0.
 o ParseSetup(String)
Name: ParseSetup Purpose: Parses the received message, looking for lines that start with m= followed by lines the start with a=control.
 o SendDescribeMsg()
Name: SendDescribeMsg Purpose: Send the describe message to the SDP server Output: Returns the status of this operation.
 o SkipToBeginning()
SkipToBeginning - Returns the next valid token.
 o ValidTag(String, StringTokenizer, boolean)
ValidTag - Tests if the tag is a valid.
 o ValidTransProt()
ValidTransProt - Returns 1 if string is a valid transport protocol; otherwise 0.

Methods

 o MakeConnection
 public void MakeConnection()
Name: MakeConnection Purpose: Connects the client to a good socket. If the socket is bad it tries another one with a port# of 2 more.

 o SendDescribeMsg
 public int SendDescribeMsg()
Name: SendDescribeMsg Purpose: Send the describe message to the SDP server Output: Returns the status of this operation. 0 is fail, 1 is pass.

 o getSDPVector
 public Vector getSDPVector()
Name: getSDPVector Purpose: Returns the sdp vector. Output: sdp vector is a the vector the stores the sdp file a line at a time.

 o initStreamTokenizer
 public void initStreamTokenizer()
initStreamTokenizer - Initializes the whitespace and wordchars of the streamTokenizer.

 o ParseSetup
 public int ParseSetup(String received)
Name: ParseSetup Purpose: Parses the received message, looking for lines that start with m= followed by lines the start with a=control. Input: received is the message received from the SDP server. Output: Return the status of this operation. 0 means failed, 1 means passed

 o ParseA
 public int ParseA()
ParseA - Returns 1 if the line with tag a= parsed correctly; Otherwise 0.

 o ParseM
 public int ParseM()
ParseM - Returns 1 if the line with tag m= parsed correctly; Otherwise 0.

 o HandleMDirty
 public void HandleMDirty()
HandleMDirty - If aString has anything remove it; otherwise mark mString as dirty.

 o Check3or4Arg
 public int Check3or4Arg(int argNbr)
Check3or4Arg - Returns 0 if the next token is a tag. It prints an error message if argNbr is 3 or 4, but not 5.

 o SkipToBeginning
 public String SkipToBeginning()
SkipToBeginning - Returns the next valid token.

 o IsNumber
 public int IsNumber(String strPort)
IsNumber - Returns 1 if the strPort is a number and between 0 and 100000; otherwise 0.

 o ValidTransProt
 public int ValidTransProt()
ValidTransProt - Returns 1 if string is a valid transport protocol; otherwise 0.

 o ValidTag
 public int ValidTag(String tag,
                     StringTokenizer st,
                     boolean displayError)
ValidTag - Tests if the tag is a valid. By valid I mean a=, and m= combos a= (with DIRTY flag).