Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-05-27 23:43:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
385ee893f50b43c228838e13fabdb1c9334525b8
385ee893
1 parent
7e04975b
update readme
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
trunk/src/app/srs_app_listener.cpp
trunk/src/app/srs_app_listener.cpp
查看文件 @
385ee89
...
...
@@ -113,18 +113,18 @@ int SrsUdpListener::listen()
if
((
_fd
=
socket
(
AF_INET
,
SOCK_DGRAM
,
0
))
==
-
1
)
{
ret
=
ERROR_SOCKET_CREATE
;
srs_error
(
"create linux socket error. port=%d, ret=%d"
,
ip
.
c_str
(),
port
,
ret
);
srs_error
(
"create linux socket error.
ip=%s,
port=%d, ret=%d"
,
ip
.
c_str
(),
port
,
ret
);
return
ret
;
}
srs_verbose
(
"create linux socket success. port=%d, fd=%d"
,
ip
.
c_str
(),
port
,
_fd
);
srs_verbose
(
"create linux socket success.
ip=%s,
port=%d, fd=%d"
,
ip
.
c_str
(),
port
,
_fd
);
int
reuse_socket
=
1
;
if
(
setsockopt
(
_fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
&
reuse_socket
,
sizeof
(
int
))
==
-
1
)
{
ret
=
ERROR_SOCKET_SETREUSE
;
srs_error
(
"setsockopt reuse-addr error. port=%d, ret=%d"
,
ip
.
c_str
(),
port
,
ret
);
srs_error
(
"setsockopt reuse-addr error.
ip=%s,
port=%d, ret=%d"
,
ip
.
c_str
(),
port
,
ret
);
return
ret
;
}
srs_verbose
(
"setsockopt reuse-addr success. port=%d, fd=%d"
,
ip
.
c_str
(),
port
,
_fd
);
srs_verbose
(
"setsockopt reuse-addr success.
ip=%s,
port=%d, fd=%d"
,
ip
.
c_str
(),
port
,
_fd
);
sockaddr_in
addr
;
addr
.
sin_family
=
AF_INET
;
...
...
请
注册
或
登录
后发表评论