Jump to content

Networking


Rick
 Share

Recommended Posts

1. In CreateHost() the last parameter is player count. Is there any API restrictions on this number that this can be? Is there a way to accept any amount of players? Like if I pass 0 will it accept any number who try to connect?

 

2. I see DisconnectHost() but it takes a Peer parameter so I assume that's for the clients. How does the server shutdown? Is there a command for that or when the main loop end it just stops? How would this work in the editor. If I make a server object where when I do "run game" from the editor is where it CreatesHost(), I assume that host will just stay open listening. I would like to do some kind of server stop listening in the Free() event.

 

3. Also how does host:WaitEvent(1) work? The parameter looks like a timeout according to the wiki. Does that mean it'll block for 1/100 of a second ^. Can you pass 0 and have it still work?

 

4. What's the flow of event id's when client tries to connect to server. I see EVENT_CONNECT is an event id type. Does that mean client received that it did in fact connect to server or server saying a client has connected? Or both? Or what?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...