@@ -51,19 +51,19 @@ TcpClient onStart(TcpListener listener)
51
51
string value = args . First ( ) ;
52
52
if ( value . Length <= 5 )
53
53
{
54
- validate ( true , portChecker . IsValid ( value ) ) ;
54
+ Validate ( true , portChecker . IsValid ( value ) ) ;
55
55
remoteClient = ConnectionService . Create ( int . Parse ( value ) , onStart ) ;
56
56
}
57
57
else
58
58
{
59
- validate ( ipChecker . IsValid ( value ) , true ) ;
59
+ Validate ( ipChecker . IsValid ( value ) , true ) ;
60
60
remoteClient = ConnectionService . Create ( IPAddress . Parse ( value ) , onStart ) ;
61
61
}
62
62
break ;
63
63
case 2 :
64
64
string ? ipArg = args . ElementAt ( 0 ) ;
65
65
string ? portArg = args . ElementAt ( 1 ) ;
66
- validate ( ipChecker . IsValid ( ipArg ) , portChecker . IsValid ( portArg ) ) ;
66
+ Validate ( ipChecker . IsValid ( ipArg ) , portChecker . IsValid ( portArg ) ) ;
67
67
remoteClient = ConnectionService . Create ( IPAddress . Parse ( ipArg ) , int . Parse ( portArg ) , onStart ) ;
68
68
break ;
69
69
default :
@@ -79,7 +79,7 @@ TcpClient onStart(TcpListener listener)
79
79
Settings . beepOnIncomingMessage = beep ;
80
80
}
81
81
82
- private void validate ( bool validIP = true , bool validPort = true ) {
82
+ private static void Validate ( bool validIP = true , bool validPort = true ) {
83
83
StringBuilder stringBuilder = new StringBuilder ( ) ;
84
84
if ( ! validIP ) stringBuilder . AppendLine ( "Invalid IP address!" ) ;
85
85
if ( ! validPort ) stringBuilder . AppendLine ( "Invalid ephemeral port! must be exclusively between 1024 and 65535." ) ;
0 commit comments