Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 support (for 3.0 release) #988

Merged
merged 12 commits into from
Oct 14, 2017
Merged

Conversation

dreibh
Copy link
Contributor

@dreibh dreibh commented Sep 21, 2017

This pull request adds IPv6 support to SRS.

Test with:

Start SRS:
./objs/srs -c conf/rtmp.conf
Start ffmpeg:
for((;;)); do
ffmpeg -re -i ./doc/source.200kbps.768x320.flv
-vcodec copy -acodec copy
-f flv -y rtmp://[::1]/live/livestream;
sleep 1
done
Start ffplay:
ffplay rtmp://[::1]:1935/live/livestream

@winlinvip
Copy link
Member

Good job, SRS3 is open to accept feature PRs.

trunk/configure Outdated
@@ -86,7 +86,7 @@ done
#####################################################################################
# build tools or compiler args.
# enable gdb debug
GDBDebug=" -g -O0"
GDBDebug=" -g -O1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has nothing to do with IPv6, right? Please revert this change.

(char*)&address_string, sizeof(address_string),
(char*)&port_string, sizeof(port_string),
NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
abort();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why abort?

@dreibh
Copy link
Contributor Author

dreibh commented Sep 22, 2017

The issues are fixed now:

  • Reverted option change.
  • Replaced abort() call by proper error handling.

@winlinvip
Copy link
Member

Good work~
I'm a little busy these days, I'm gonna merge this PR ASAP.

@winlinvip winlinvip merged commit c215ec7 into ossrs:3.0release Oct 14, 2017
winlinvip added a commit that referenced this pull request Oct 14, 2017
@winlinvip
Copy link
Member

I refine some lines for this PR:

  1. using SrsAutoFree to simply the memory management. 19789d1#diff-20c16acb115c216c11c23f6d97f272faR126
  2. providing srs_any_address4listener to replace srs_check_ipv6. 19789d1#diff-cdac2e30902015d017eb5e1a4a8d660cR203
  3. correct the usage of getnameinfo, should use char* not char**. 19789d1#diff-8bbad68462c97e3e7a61786a559e47fdR1117
  4. some coding style differences. 19789d1#diff-58d5993e82f2c790847ba3f4dc04de60R130

winlinvip pushed a commit that referenced this pull request Jan 1, 2018
* IPv6 support, part 1.

* IPv6 support, part 2.

* Some more IPv6 work.

* Made functions for address:port paŕsing IPv6-capable.

* Fixed type (compile warning).

* Fixed formatting.

* Reverted option change.

* Replaced abort() by proper error handling.

* Also retrieving local IPv6 addresses now.
winlinvip added a commit that referenced this pull request Jan 1, 2018
@winlinvip winlinvip changed the title IPv6 support (for 3.0 release) Listen at IPv4+IPv6 support (for 3.0 release) Jan 7, 2018
@winlinvip winlinvip changed the title Listen at IPv4+IPv6 support (for 3.0 release) IPv6 support (for 3.0 release) Jan 7, 2018
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants