mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-29 08:56:18 +02:00
server & client connection
git-svn-id: svn://elaine/murooma/trunk@270 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
d85858ac62
commit
2cf7855261
15 changed files with 184 additions and 123 deletions
|
@ -54,6 +54,11 @@ void StreamServer::acceptor()
|
|||
for (;;)
|
||||
{
|
||||
socket_ptr sock(new tcp::socket(io_service_));
|
||||
struct timeval tv;
|
||||
tv.tv_sec = 5;
|
||||
tv.tv_usec = 0;
|
||||
setsockopt(sock->native(), SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
|
||||
setsockopt(sock->native(), SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
|
||||
a.accept(*sock);
|
||||
cout << "StreamServer::New connection: " << sock->remote_endpoint().address().to_string() << "\n";
|
||||
StreamSession* session = new StreamSession(sock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue