Corrected cmd args in SCTP Sample clients

This commit is contained in:
Jestan Nirojan 2012-09-23 14:16:26 +08:00
parent b268f0b333
commit 942f05d336
2 changed files with 5 additions and 5 deletions

View File

@ -86,7 +86,7 @@ public class NioSctpEchoClient {
}
// Parse options.
final String host = "localhost";
final String host = args[0];
final int port = Integer.parseInt(args[1]);
final int firstMessageSize;
if (args.length == 3) {

View File

@ -77,16 +77,16 @@ public class OioSctpEchoClient {
public static void main(String[] args) throws Exception {
// Print usage if no argument is specified.
/* if (args.length < 2 || args.length > 3) {
if (args.length < 2 || args.length > 3) {
System.err.println(
"Usage: " + OioSctpEchoClient.class.getSimpleName() +
" <host> <port> [<first message size>]");
return;
}*/
}
// Parse options.
final String host = "localhost";
final int port = 2556;
final String host = args[0];
final int port = Integer.parseInt(args[1]);
final int firstMessageSize;
if (args.length == 3) {
firstMessageSize = Integer.parseInt(args[2]);