Network library with guaranteed UDP?
BlitzMax Forums/BlitzMax Programming/Network library with guaranteed UDP?
| ||
Any good cross-platform bmx libraries out there? |
| ||
gnet or BNetEx |
| ||
I can't seem to find BNetEx. All links I can find are dead? |
| ||
I don't think gnet has garanteed UDP, or ??? (as it is based on ENET, maybe it's implemented ?) |
| ||
BNetEx Bnet only supports unreliable udp. You would need to code an ack type system for safe udp. |
| ||
Checked out enet. It has guaranteed UDP and looks pretty cool actually. With bandwidth control and stuff. I'll look into it some more and get back to you :) |
| ||
isnt the point of UDP is that its not guaranteed? just fire and forget and hope it gets there. |
| ||
Yes and no. The main reason to use UDP is that you can enable guaranteed only on important messages but not on unimportant stuff. That way you can have high frequency where needed but as well guaranteed receive where needed (login message for example) |
| ||
I wrapped ENet in a simple class in about 10 mins and it works like a charm :) |
| ||
Enet is ALREADY wrapped with BlitzMax !!! This was done by Mark Sibly 6 months ago, and used in gnet. However, I am not sure if it was 100% wrapped?? |
| ||
GNet is not what I was looking for ;) It's not a 100% wrapped, the ping functions among others are missing. I might have a go at it later, but for now my own wrapper is just what I need :) |
| ||
are you going to post it for us? |
| ||
Never done anything multiplayer, but Wave's TNet: http://www.truplo.com/TNet/ Dunno about guaranteed UDP, it says "reliable". :) |
| ||
It's not reliable. Here's my wrapper. You'll still need the occasional ENet function tho. So you need to call update and you get callbacks when stuff happens. This might come in handy too: Send with ' Send it good SendPacket.Rewind() SendPacket.WriteInt(SOME_PACKET_ID) SendPacket.WriteString("Hello!") Send(player.peer, SendPacket.Lock(), SendPacket.GetOffset()) SendPacket.Unlock() The peer is found in the event structure you get on the callbacks. For futher questions, don't hesitate to ask :) |
| ||
oops! |
| ||
I'd wondered about the "reliable packet" option in GNet ever since it was mentioned that it uses ENet/UDP, so thanks for your ENet wrapper/GNet extender, ozak. I've been a fan of UDP's optional-reliability nature ever since using Surreal's BlitzPlay with Blitz3D. |
| ||
Unless you're writting an application that really ought to use TCP, you don't really need reliable UDP. Sequential is usually good enough. |