Bug 1607 - OnOff Application over TCP with IPv6 (fixed bulk-send too)
This commit is contained in:
@@ -126,7 +126,15 @@ void BulkSendApplication::StartApplication (void) // Called at time specified by
|
||||
"In other words, use TCP instead of UDP.");
|
||||
}
|
||||
|
||||
m_socket->Bind ();
|
||||
if (Inet6SocketAddress::IsMatchingType (m_peer))
|
||||
{
|
||||
m_socket->Bind6 ();
|
||||
}
|
||||
else if (InetSocketAddress::IsMatchingType (m_peer))
|
||||
{
|
||||
m_socket->Bind ();
|
||||
}
|
||||
|
||||
m_socket->Connect (m_peer);
|
||||
m_socket->ShutdownRecv ();
|
||||
m_socket->SetConnectCallback (
|
||||
|
||||
@@ -148,7 +148,14 @@ void OnOffApplication::StartApplication () // Called at time specified by Start
|
||||
if (!m_socket)
|
||||
{
|
||||
m_socket = Socket::CreateSocket (GetNode (), m_tid);
|
||||
m_socket->Bind ();
|
||||
if (Inet6SocketAddress::IsMatchingType (m_peer))
|
||||
{
|
||||
m_socket->Bind6 ();
|
||||
}
|
||||
else if (InetSocketAddress::IsMatchingType (m_peer))
|
||||
{
|
||||
m_socket->Bind ();
|
||||
}
|
||||
m_socket->Connect (m_peer);
|
||||
m_socket->SetAllowBroadcast (true);
|
||||
m_socket->ShutdownRecv ();
|
||||
|
||||
Reference in New Issue
Block a user