Network library with guaranteed UDP?

BlitzMax Forums/BlitzMax Programming/Network library with guaranteed UDP?

ozak(Posted 2006) [#1]
Any good cross-platform bmx libraries out there?


Dreamora(Posted 2006) [#2]
gnet or BNetEx


ozak(Posted 2006) [#3]
I can't seem to find BNetEx. All links I can find are dead?


RepeatUntil(Posted 2006) [#4]
I don't think gnet has garanteed UDP, or ??? (as it is based on ENET, maybe it's implemented ?)


errno!(Posted 2006) [#5]
BNetEx

Bnet only supports unreliable udp. You would need to code an ack type system for safe udp.


ozak(Posted 2006) [#6]
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 :)


smilertoo(Posted 2006) [#7]
isnt the point of UDP is that its not guaranteed? just fire and forget and hope it gets there.


Dreamora(Posted 2006) [#8]
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)


ozak(Posted 2006) [#9]
I wrapped ENet in a simple class in about 10 mins and it works like a charm :)


RepeatUntil(Posted 2006) [#10]
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??


ozak(Posted 2006) [#11]
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 :)


Jay Kyburz(Posted 2006) [#12]
are you going to post it for us?


Booticus(Posted 2006) [#13]
Never done anything multiplayer, but Wave's TNet:

http://www.truplo.com/TNet/

Dunno about guaranteed UDP, it says "reliable". :)


ozak(Posted 2006) [#14]
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 :)


Booticus(Posted 2006) [#15]
oops!


WendellM(Posted 2006) [#16]
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.


FlameDuck(Posted 2006) [#17]
Unless you're writting an application that really ought to use TCP, you don't really need reliable UDP. Sequential is usually good enough.