Skip to content

Commit

Permalink
Added class UdpSocket
Browse files Browse the repository at this point in the history
  • Loading branch information
hfedcba committed Jul 4, 2016
1 parent 4691a30 commit 3658e4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/KodiInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ KodiInterface::KodiInterface()
_out.setPrefix(GD::out.getPrefix() + "Kodi interface: ");

signal(SIGPIPE, SIG_IGN);
_socket = std::unique_ptr<BaseLib::SocketOperations>(new BaseLib::SocketOperations(GD::bl));
_socket = std::unique_ptr<BaseLib::TcpSocket>(new BaseLib::TcpSocket(GD::bl));

_jsonEncoder.reset(new BaseLib::RPC::JsonEncoder(GD::bl));
_jsonDecoder.reset(new BaseLib::RPC::JsonDecoder(GD::bl));
Expand Down Expand Up @@ -247,7 +247,7 @@ void KodiInterface::startListening()
{
stopListening();
if(_hostname.empty()) return;
_socket = std::unique_ptr<BaseLib::SocketOperations>(new BaseLib::SocketOperations(GD::bl, _hostname, std::to_string(_port)));
_socket = std::unique_ptr<BaseLib::TcpSocket>(new BaseLib::TcpSocket(GD::bl, _hostname, std::to_string(_port)));
GD::bl->threadManager.start(_listenThread, true, &KodiInterface::listen, this);
}
catch(const std::exception& ex)
Expand Down
2 changes: 1 addition & 1 deletion src/KodiInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class KodiInterface
};

BaseLib::Output _out;
std::unique_ptr<BaseLib::SocketOperations> _socket;
std::unique_ptr<BaseLib::TcpSocket> _socket;
std::string _hostname;
int32_t _port = 9090;
std::unique_ptr<BaseLib::RPC::JsonEncoder> _jsonEncoder;
Expand Down

0 comments on commit 3658e4d

Please sign in to comment.