520 |
|
|
521 |
/** |
/** |
522 |
* Returns the port number of the remote end of the socket connection. If |
* Returns the port number of the remote end of the socket connection. If |
523 |
* this socket is not connected, then -1 is returned. |
* this socket is not connected, then 0 is returned. |
524 |
* |
* |
525 |
* @return The remote port this socket is connected to |
* @return The remote port this socket is connected to |
526 |
*/ |
*/ |
527 |
public int getPort() |
public int getPort() |
528 |
{ |
{ |
529 |
if (! isConnected()) |
if (! isConnected()) |
530 |
return -1; |
return 0; |
531 |
|
|
532 |
try |
try |
533 |
{ |
{ |