mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-06 10:09:33 +02:00
dont resolve
git-svn-id: svn://elaine/murooma/trunk@239 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
b61c6f0217
commit
0ca2460971
4 changed files with 16 additions and 9 deletions
|
@ -27,13 +27,17 @@ void ServerConnection::socketRead(tcp::socket* socket, void* to, size_t bytes)
|
|||
}
|
||||
|
||||
|
||||
void ServerConnection::start(MessageReceiver* receiver, const std::string& ip, int port)
|
||||
void ServerConnection::start(MessageReceiver* receiver, const std::string& ip, size_t port)
|
||||
{
|
||||
messageReceiver = receiver;
|
||||
tcp::resolver resolver(io_service);
|
||||
endpt.address(boost::asio::ip::address::from_string(ip));
|
||||
endpt.port((port));
|
||||
std::cout << "Endpoint IP: " << endpt.address().to_string() << std::endl;
|
||||
std::cout << "Endpoint Port: " << endpt.port() << std::endl;
|
||||
/* tcp::resolver resolver(io_service);
|
||||
tcp::resolver::query query(tcp::v4(), ip, boost::lexical_cast<string>(port));
|
||||
iterator = resolver.resolve(query);
|
||||
receiverThread = new thread(&ServerConnection::worker, this);
|
||||
*/ receiverThread = new thread(&ServerConnection::worker, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -99,7 +103,7 @@ void ServerConnection::worker()
|
|||
try
|
||||
{
|
||||
tcp::socket s(io_service);
|
||||
s.connect(*iterator);
|
||||
s.connect(endpt);//address, port);//*iterator);
|
||||
struct timeval tv;
|
||||
tv.tv_sec = 5;
|
||||
tv.tv_usec = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue