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

端口冲突问题 #55

Open
liyugui1417 opened this issue Nov 28, 2024 · 1 comment
Open

端口冲突问题 #55

liyugui1417 opened this issue Nov 28, 2024 · 1 comment

Comments

@liyugui1417
Copy link

在windows上面调试rtspclient和rtspserver,使用udp的方式,结果一直在poll等待超时,排查了发现端口冲突了,服务端口和客户端端口一样;经过跟踪排查应该是sockpair_create2函数中rand()不是完全随机导致的

@liyugui1417
Copy link
Author

目前是使用更复杂的随机数种子处理
unsigned int seed = (unsigned int) time(NULL) ^ (unsigned int) process_self();
srand(seed);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant