Skip to content

Commit

Permalink
Expose server port
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandenEK committed Jul 13, 2023
1 parent 94677a6 commit 1a68aab
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/SuperSimpleTcp/SimpleTcp.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/SuperSimpleTcp/SimpleTcpServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@ public int Connections
}
}

/// <summary>
/// The port that the server is running on
/// </summary>
public int Port
{
get
{
return _listener == null ? 0 : ((IPEndPoint)_listener.LocalEndpoint).Port;
}
}

/// <summary>
/// Method to invoke to send a log message.
/// </summary>
Expand Down

0 comments on commit 1a68aab

Please sign in to comment.