Skip to content

Commit

Permalink
Merge pull request #192 from BrandenEK/master
Browse files Browse the repository at this point in the history
Expose server port
  • Loading branch information
jchristn authored Jul 13, 2023
2 parents 94677a6 + 1a68aab commit 1c399d0
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 1c399d0

Please sign in to comment.