irrNetLite 2.1 [BETA]

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

Postby Brainsaw » Wed Feb 03, 2010 6:45 am

I hope I'll find some time during the next week or so to create a test application for that problem. Maybe I'll just modify one of the examples.

I think I didn't add "USE_IRRLICHT". Have to try that ;).
User avatar
Brainsaw
 
Posts: 1038
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Postby Nox » Wed Feb 03, 2010 8:08 pm

Well i got a little problem with the pre-set broadband. I dont know how to examinate the limit, so i cant set it to a resonable value. But the pre-set value is just to small.
Nox
 
Posts: 304
Joined: Wed Jan 14, 2009 6:23 pm

Postby polylux » Sat Feb 13, 2010 6:18 pm

Good evening!

I got a pretty strange runtime error with irrnetlite. That occurs when at the end of the scope the SOutPacket is automatically deallocated. More specifically, i get pointed to the destructor of core::array, which is one of its members - haven't yet figured out why it segfaults.

Has anyone had the same issue before? I am using irrlicht 1.6 and the (latest?) irrnetlite version - as offered in the very first post of this thread.

Thanks for any suggestions & cheers,
p.
beer->setMotivationCallback(this);
User avatar
polylux
 
Posts: 210
Joined: Thu Aug 27, 2009 12:39 pm
Location: EU, Austria

Postby BlindSide » Sat Feb 13, 2010 7:51 pm

polylux wrote:Good evening!

I got a pretty strange runtime error with irrnetlite. That occurs when at the end of the scope the SOutPacket is automatically deallocated. More specifically, i get pointed to the destructor of core::array, which is one of its members - haven't yet figured out why it segfaults.

Has anyone had the same issue before? I am using irrlicht 1.6 and the (latest?) irrnetlite version - as offered in the very first post of this thread.

Thanks for any suggestions & cheers,
p.


Are you using the .lib version or including the files into the project manually?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
 
Posts: 2797
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Postby polylux » Sat Feb 13, 2010 8:26 pm

I built a static library with the included makefile. Plus I just found out that it behaves weird, like randomly sent/received data. Gotta have a look at that...
beer->setMotivationCallback(this);
User avatar
polylux
 
Posts: 210
Joined: Thu Aug 27, 2009 12:39 pm
Location: EU, Austria

Postby Brainsaw » Sun Feb 14, 2010 10:57 am

polylux wrote:Good evening!

I got a pretty strange runtime error with irrnetlite. That occurs when at the end of the scope the SOutPacket is automatically deallocated. More specifically, i get pointed to the destructor of core::array, which is one of its members - haven't yet figured out why it segfaults.

Has anyone had the same issue before? I am using irrlicht 1.6 and the (latest?) irrnetlite version - as offered in the very first post of this thread.

Thanks for any suggestions & cheers,
p.


I had the same problem but didn't solve it. I created a workaround by exchanging the dynamic buffers (irr::array) by a static one (4k ... way more than I need). Works good ever since.
User avatar
Brainsaw
 
Posts: 1038
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Postby polylux » Sun Feb 14, 2010 11:22 am

Yep, I just added the SOutPacket as a class member. Now I have to clearData() before I use it but that's fine when it works. And strangely - it does.
beer->setMotivationCallback(this);
User avatar
polylux
 
Posts: 210
Joined: Thu Aug 27, 2009 12:39 pm
Location: EU, Austria

Postby BlindSide » Sun Feb 14, 2010 4:16 pm

polylux wrote:I built a static library with the included makefile. Plus I just found out that it behaves weird, like randomly sent/received data. Gotta have a look at that...


The problem may be that you built the static library with the irrArray.h that came with irrNetLite, but used it with Irrlicht with the irrArray.h that came with Irrlicht, similar to having the incorrect Irrlicht DLL/header files situation. You can try to rebuild irrNetLite with USE_IRRLICHT defined (Remember to include the Irrlicht headers and delete irrArray, string, etc that came with irrNetLite to be sure).

I hope that explains it a little better.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
 
Posts: 2797
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Postby polylux » Mon Feb 15, 2010 12:28 pm

That makes sense, gotta give it a try as soon as I get home - thanks BlindSide. :)
Having played around with it, I really have to say irrnetlite is a great addon to the engine.
beer->setMotivationCallback(this);
User avatar
polylux
 
Posts: 210
Joined: Thu Aug 27, 2009 12:39 pm
Location: EU, Austria

Postby Brainsaw » Tue Feb 16, 2010 6:44 am

Shame on me. I played around a little bit yesterday and it turned out that there were some pointers I didn't NULL out after deleting the objects, and therefore they were pointing at garbage. The debugger didn't really help me there :( . I can now re-start the server without problems, but as soon as I do a restart I am no longer able to connect to it.

I also tried that with one of the Examples and VC, same behaviour there. I added a key to the server that would simply delete the two objects that are also deleted before exiting the program and immediately re-create them. No crash on the server, but I couldn't connect to the server any more.
User avatar
Brainsaw
 
Posts: 1038
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Postby Brainsaw » Wed Feb 17, 2010 1:56 pm

Another question I have: is there a way to get the IP address of the server using irrnetlite or enet functions? I want to display the server's IP address on the "start net game" screen.
User avatar
Brainsaw
 
Posts: 1038
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Postby Nox » Sat Feb 20, 2010 3:06 pm

@Brainsaw this is hardly possible because a server can have multiple IPs. Dont know if enet supports it to query this infos.

Finally irrNetLite made it in the networklibsbenc test.
A new version (0.6) of this test: http://sourceforge.net/projects/networklibsbenc/
Some new testresults: http://sourceforge.net/apps/gallery/networklibsbenc/
Nox
 
Posts: 304
Joined: Wed Jan 14, 2009 6:23 pm

Postby randomMesh » Sun Feb 21, 2010 10:04 pm

Brainsaw wrote:is there a way to get the IP address of the server using irrnetlite or enet functions?

Something like this?
Code: Select all
char hostip[16];
enet_address_get_host_ip(&serverAddress, hostip, 16);
printf("%s\n", hostip);


@BlindSide: How does your SPacket class handle big endian to little endian connections (and vice-versa)?

I have a similar wrapper class to ENetPackets and my method for adding e.g. an integer to the packet is like this:
Code: Select all
void Message::addUnsignedInt(const unsigned int ui)
{
   const size_t tokenSize = sizeof(unsigned int);

   if (dynamicResize(tokenSize) < 0)
      return;

   unsigned int* const ui_ptr = (unsigned int* const)(&this->packet->data[this->read_write_head]);
   *ui_ptr = ENET_HOST_TO_NET_32(ui);

   this->read_write_head += tokenSize;
}


Note the ENET_HOST_TO_NET_32, which basically is htonl. For reading, ENET_NET_TO_HOST_32 is used.

Does either the irrlicht array or your operators take care of this?
"In fact, nearly every sequence of punctuation is used for something in Perl. So, if you get writer’s block, just let the cat walk across the keyboard, and debug the result."

Katastrophe - A free, open source flocking boids simulation
User avatar
randomMesh
 
Posts: 1138
Joined: Fri Dec 29, 2006 12:04 am

Postby Brainsaw » Tue Feb 23, 2010 6:48 am

Hmm .. I tried the suggestions yesterday, and I still got "0.0.0.0" as IP address of the server. Still ... I got my computers name ("Bebop" on my Desktop and "DarkStar" on my Notebook). I there a way in irrnetlite or enet to get the IP address from the computer name? Thanks for your help.
User avatar
Brainsaw
 
Posts: 1038
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Postby randomMesh » Tue Feb 23, 2010 4:03 pm

Brainsaw wrote:I still got "0.0.0.0" as IP address of the server.

Hm, CNetManager hides access to its member ENetAddress address. Don't know which address you used, but you need to add a getter for this first and use that address.
"In fact, nearly every sequence of punctuation is used for something in Perl. So, if you get writer’s block, just let the cat walk across the keyboard, and debug the result."

Katastrophe - A free, open source flocking boids simulation
User avatar
randomMesh
 
Posts: 1138
Joined: Fri Dec 29, 2006 12:04 am

PreviousNext

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 0 guests