Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / DarkNET disconnects after sending UDP package

Author
Message
jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 18th Apr 2010 23:09 Edited at: 18th Apr 2010 23:57
Hello,

In my current project, when you host a multiplayer game, you connect to yourself (so the server is a listen server, not a dedicated one). Everything is fine, until the first UDP package is sent. When I do that, it just disconnects.

This is the code I use:


Can anyone help me?

Thanks!

Jeff

EDIT: This is the server creation code:



And this is the online handling code:



KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 19th Apr 2010 18:28
In the receiving of UDP packets, you don't receive the operation ID, DarkNet does that for you.

The last parameter of MN RECV UDP is the operation id, which you have set to 0. Set that to the operation you want to receive, but don't use 0. Use 1 or above.

Login to post a reply

Server time is: 2026-07-26 07:36:22
Your offset time is: 2026-07-26 07:36:22