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