What should I do about networking?

Monkey Forums/Monkey Programming/What should I do about networking?

ImmutableOctet(SKNG)(Posted 2013) [#1]
I've been porting a game I was writing in BlitzMax to Monkey, and I'm looking for a good networking module(For Windows and Android). MNet seemed to be a good choice, but from my experience, it doesn't even function. The socket example that comes with it looks like it's meant for ANet(Using commands that aren't even in MNet), so it doesn't even compile. So, I wrote my own example, and half the time it doesn't compile either. And when I can get it to compile, it doesn't work anyway. Is this some kind of compatibility issue with V66 and V67, or does it really not work?

So, at this point I'm going to use ANet for Android, but that doesn't really help for Windows. I'd use the TcpStream class from the BRL module, but it's only for clients, and I need to be able to host a server, as well as connect to one(Plus, I'm not a fan of TCP).

Should I just use ANet, and make my own module using a C++ library for the Windows build, or am I missing something here? If you want to see what I was doing to test MNet, I'll post it separately, but this post is already long enough.

As a side note; Everything else with the port works perfectly, so buying Monkey was definitely a good choice.


EdzUp(Posted 2013) [#2]
Why not host with blitzmax server and have monkey connect to that :-)


ImmutableOctet(SKNG)(Posted 2013) [#3]
Well, I'd like to be able to host a server from a client. I love BlitzMax, but if I can, I'd like to stick to purely Monkey(Excluding external code).

ANet seems to be able to do this, and I'd like to have the same functionality on the desktop. I'd use MNet, but it still looks like a mess. (Have you gotten MNet to work on Windows?) Xaron supposedly implemented it, so I don't know why it isn't working.

I am considering making a DLL of BNetEx in BlitzMax, and using it in Monkey for the Windows build. That's what I was using before I ported the game over to Monkey.


ImmutableOctet(SKNG)(Posted 2013) [#4]
To anyone reading this who's looking for a UDP networking library/module, I've created one for GLFW/STDCPP on Windows. You can find it here: http://monkeycoder.co.nz/Community/posts.php?topic=4866

It's currently based on WinSock, but it can be ported to use other C/C++ libraries. The library is also available to C++ developers.