xolod писал(а):А что ты подразумеваешь под реальным временем?
Включи netmeeting на слабом канале - он там тоже работать еле будет. Звук будет с огромными лагами приходить.
SeT писал(а):Snussi
Ты поясни свою мазу. Непонятно же ничего. Расскажи честному народу про свойства DirectPlay'я
DirectPlay Voice Networking
Microsoft® DirectPlay® Voice uses a DirectPlay session for media-independent network transport and player management. The DirectPlay Voice API does not duplicate session control features from DirectPlay. A DirectPlay network transport session must also be created before DirectPlay Voice can transmit and receive voice communications. DirectPlay Voice can use either the IDirectPlay4 object or IDirectPlay8 object for network transport.
Note that if DirectPlay Voice is being used in-process with a multiplayer game, the game will most likely also use the transport session to exchange its game-specific data. This makes it possible to optimize the use of network resources between the game and voice data.
It is also acceptable to create and use a transport session specifically for the voice session, as would be the case for a standalone voice conferencing application.
Public g_DPlay As DirectPlay4
Public g_EnumConnections As DirectPlayEnumConnections
Public g_DPAddress As DirectPlayAddress
Private Sub Form_Load()
Set g_DPlay = g_dx.DirectPlayCreate("")
Set g_EnumConnections = g_DPlay.GetDPEnumConnections("", DPCONNECTION_DIRECTPLAY)
InterList.Clear
' Поиск доступных сетевых интерфейсов....
If InitConnList = False Then
Log "Интерфейсы не найдены. Останов."
Exit Sub
End If
End Sub
Public Function InitConnList() As Boolean
Dim NumConnections As Long
Dim strName As String
Dim x As Long
On Error GoTo FAILED
NumConnections = g_EnumConnections.GetCount
For x = 1 To NumConnections
strName = g_EnumConnections.GetName(x)
BF.InterList.AddItem strName
Next x
InitConnList = True
Exit Function
' Error handlers
FAILED:
InitConnList = False
Exit Function
End Function
Private Sub InterList_DblClick()
' Продолжаем инициализацию интерфейсов
If InitInterFace(InterList.ListIndex + 1) = True Then
InterList.Visible = False
StartServer
End If
End Sub
Public Function InitInterFace(InterF As Long) As Boolean
On Error GoTo INITIALIZEFAILED
Set g_DPAddress = g_EnumConnections.GetAddress(InterF)
Call g_DPlay.InitializeConnection(g_DPAddress)
On Error GoTo 0
InitInterFace = True
Exit Function
' Error handlers
INITIALIZEFAILED:
If Err.Number <> DPERR_ALREADYINITIALIZED Then
InitInterFace = False
End If
End Function
Public Sub StartServer()
BF.Show
MaxPlayers = 16
SessionName = "TestServer Session"
fGUID = "{AC330441-9B71-11D2-9AAB-0020781461AC}" ' Гуид, как вы понимаете, любой.
Dim SessionData As DirectPlaySessionData
Set SessionData = g_DPlay.CreateSessionData
Call SessionData.SetMaxPlayers(MaxPlayers)
Call SessionData.SetSessionName(SessionName)
Call SessionData.SetGuidApplication(fGUID)
Call SessionData.SetFlags(DPSESSION_DIRECTPLAYPROTOCOL Or DPSESSION_OPTIMIZELATENCY)
on error GoTo failedOpen
Call g_DPlay.Open(SessionData, DPOPEN_CREATE)
debug.print "Сервер с именем " + SessionName + " создан. Максимальное количество игроков - " + CStr(MaxPlayers)
CreateServerPlayer
Log "Цикл ожидания событий запущен."
Do While DoEvents()
GetDPMessages
Loop
Exit Sub
failedOpen:
debug.print "Не могу создать сервер !"
End
End Sub
Сейчас этот форум просматривают: Yandex-бот и гости: 65