mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
TCP: Log the remote port for client.
This commit is contained in:
parent
e01b98c91e
commit
81a7c252d6
14 changed files with 68 additions and 39 deletions
|
@ -253,11 +253,14 @@ srs_error_t SrsRtspConn::do_cycle()
|
|||
srs_error_t err = srs_success;
|
||||
|
||||
// retrieve ip of client.
|
||||
std::string ip = srs_get_peer_ip(srs_netfd_fileno(stfd));
|
||||
int fd = srs_netfd_fileno(stfd);
|
||||
std::string ip = srs_get_peer_ip(fd);
|
||||
int port = srs_get_peer_port(fd);
|
||||
|
||||
if (ip.empty() && !_srs_config->empty_ip_ok()) {
|
||||
srs_warn("empty ip for fd=%d", srs_netfd_fileno(stfd));
|
||||
}
|
||||
srs_trace("rtsp: serve %s", ip.c_str());
|
||||
srs_trace("rtsp: serve %s:%d", ip.c_str(), port);
|
||||
|
||||
// consume all rtsp messages.
|
||||
while (true) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue