mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 18:25:37 +08:00
refs #308 Instead of enumerating hosts, use the well known host url
Since we are hosting in the same process, we can get the URL from the host object and pass it to new clients.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "directplay_peer.h"
|
||||
#include "multiplayer_packet_parser.h"
|
||||
#include "blacksimplugin_freefunctions.h"
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
#include <QFile>
|
||||
@@ -253,6 +254,24 @@ namespace BlackSimPlugin
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT CDirectPlayPeer::createHostAddress()
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
// Create our IDirectPlay8Address Device Address
|
||||
if( FAILED( hr = CoCreateInstance( CLSID_DirectPlay8Address, nullptr,
|
||||
CLSCTX_INPROC_SERVER,
|
||||
IID_IDirectPlay8Address,
|
||||
reinterpret_cast<void**>(&m_deviceAddress) ) ) )
|
||||
return printDirectPlayError(hr);
|
||||
|
||||
// Set the SP for our Device Address
|
||||
if( FAILED( hr = m_deviceAddress->SetSP( &CLSID_DP8SP_TCPIP ) ) )
|
||||
return printDirectPlayError(hr);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDirectPlayPeer::sendMessage( const QByteArray &message)
|
||||
{
|
||||
HRESULT hr = S_OK;
|
||||
|
||||
Reference in New Issue
Block a user