direct play question
for some reason when a client joins my server the createPlayer
message doesn''t get sent out to the server its only called when the server starts hosting. Yet I can still transfer data between client and server Does anyone know how this can be? I''d really appreciate any help. I need some way of letting the server know a client has joined.
games rule
> the createPlayer message {is} only called when the server starts hosting
This is normal as the Host() call determines which port to use and which service provider to access. You can''t get connected clients until the server starts hosting.
> Yet I can still transfer data between client and server
I don''t think this is the case. Your server is calling ''SendTo()'' with DPNID_ALL_PLAYERS_GROUP as the dpnid, and the flag DPNSEND_NOLOOPBACK is not specified. The server is simply queuing messages to itself and then extracting them normally; and it''s most likely patting itself in the back for a job well done in the process...![](smile.gif)
-cb
This is normal as the Host() call determines which port to use and which service provider to access. You can''t get connected clients until the server starts hosting.
> Yet I can still transfer data between client and server
I don''t think this is the case. Your server is calling ''SendTo()'' with DPNID_ALL_PLAYERS_GROUP as the dpnid, and the flag DPNSEND_NOLOOPBACK is not specified. The server is simply queuing messages to itself and then extracting them normally; and it''s most likely patting itself in the back for a job well done in the process...
![](smile.gif)
-cb
actually it is actually sending, I buillt a client and a server app and tried it on 2 different machines. the host does recieve packets from the client, is there anyway to make the server know that a client has joined other than making my own scheme to do it.
games rule
> it is actually sending
You can''t send data *before* calling Host() simply because the DPlay instance doesn''t know which service provider (TCP, modem, IPX) is being used at that point in time. If you are sending and receiving data *before* calling IDirectPlay8Server::Host() or IDirectPlay8Client::Connect(), it''s because your messages are going through a loopback. Please post the code around the Host() function call and the message callback function.
-cb
You can''t send data *before* calling Host() simply because the DPlay instance doesn''t know which service provider (TCP, modem, IPX) is being used at that point in time. If you are sending and receiving data *before* calling IDirectPlay8Server::Host() or IDirectPlay8Client::Connect(), it''s because your messages are going through a loopback. Please post the code around the Host() function call and the message callback function.
-cb
oh but this is after the server has called host() ,
and after the client has calledthe connnect() funtion .
I just don''t get any createPlayer when the client calls connect() for some reason.
and after the client has calledthe connnect() funtion .
I just don''t get any createPlayer when the client calls connect() for some reason.
games rule
I had this problem too when I started learning DPlay a few days ago, do you have this added to your direct play message handler?
EDIT:
To specify, that is a Server side message
[edited by - cynicalpenguin on August 27, 2003 1:47:04 PM]
case DPN_MSGID_INDICATE_CONNECT: { return DPN_OK; }
EDIT:
To specify, that is a Server side message
![](smile.gif)
[edited by - cynicalpenguin on August 27, 2003 1:47:04 PM]
It's time for a revolution I say! A revolution!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement