irrNetLite 2.1 [BETA]

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

Postby wITTus » Fri Feb 20, 2009 6:24 pm

BlindSide wrote:
ld warning: in /Users/Guillaume/Desktop/FirstNet/libenet.a, file is not of required architecture

It really seems the libs weren't built correctly, or on the same platform.


Well, you pre-compiled everything for x86-64.
It would be better IMO when you delete all linux binaries and simply preserve a makefile for them.

Then, the file encoding is a bit br0ken:
Code: Select all
CEncryption.h:   ASCII C++ program text, with CRLF line terminators
CNetManager.cpp: ASCII C program text, with CRLF, LF line terminators
CNetManager.h:   ASCII C program text, with CRLF, LF line terminators
Makefile:        ASCII make commands text, with CRLF, CR, LF line terminators
SPacket.cpp:     ASCII C program text, with CRLF, LF line terminators


I'm also wondering, why you made it Irrlicht independent :?:

Edit: Generated Documentation
User avatar
wITTus
 
Posts: 167
Joined: Tue Jun 24, 2008 7:41 pm
Location: Germany

Postby Ion Dune » Fri Apr 03, 2009 4:05 am

If I wanted to do file sending through irrNetLite (files up to around a megabyte) should i send the file in chunks through multiple packets, or could I just lump the whole thing into a single packet? Would it be irresponsible to do so?
Ion Dune
 
Posts: 453
Joined: Mon Nov 12, 2007 8:29 pm
Location: California, USA

Postby BlindSide » Fri Apr 03, 2009 6:14 am

It would be best to send them in lumps of something like 20kb, but there's nothing stopping you from sending the whole file at once I suppose. There's no limit to the packet size. Also remember, you shouldn't send a string for that purpose as they use a 16-bit integer for storing the size, instead passing the data directly on the packet initialization is best.
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 wITTus » Fri Apr 03, 2009 3:36 pm

BlindSide, it would be cool if one could do:

Code: Select all
SOutPacket TempOP;
TempOP << <stuff>
TempOP << <stuff>
TempOP << <stuff>

SOutPacket OP;
OP << 3;
OP << TempOP;

<Send>


But there's no operator << (const SOutPacket&)
I had to do

Code: Select all
const c8* Data = TempOP.getData();
size_t    Size = TempOP.getSize();

for (size_t i=0; i<Size; ++i)
    OP << Data[i];


Instead :?
Generated Documentation for BlindSide's irrNetLite.
"When I heard birds chirping, I knew I didn't have much time left before my mind would go." - clinko
User avatar
wITTus
 
Posts: 167
Joined: Tue Jun 24, 2008 7:41 pm
Location: Germany

Postby Nox » Fri Apr 03, 2009 6:05 pm

First UDP is not to intend to be used for filetransfer and enet neither. Second splitting packet is not needed because enet does by itselfs. But im not sure if enet will get stucked for some seconds if you try to send bigger packets.
Nox
 
Posts: 304
Joined: Wed Jan 14, 2009 6:23 pm

Postby BlindSide » Sat Apr 04, 2009 12:21 am

That's why I suggested splitting, because if you send 1 mb just like that it would halt the program for quite a while, also I already mentioned in my post that enet splits packets automatically.
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 Scarabol » Fri Apr 24, 2009 4:45 pm

Hey,

im using IrrNetLite for the first time, looks great!

BUG:
When i try example 2 it fails to send strings with white space the server prints only the first word...
When i debug message it says bad pointer
Ban doesn't work in any case :-(

Greetings
Scarabol
Scarabol
 
Posts: 167
Joined: Sat Jan 03, 2009 5:26 pm
Location: Aachen, Germany

Postby wITTus » Fri Apr 24, 2009 6:12 pm

Scarabol wrote:When i try example 2 it fails to send strings with white space the server prints only the first word...


Well, that's simply because of

Code: Select all
206                         // Take the input.
207                         std::string message;
208                         std::cin >> message;


better use std::getline(std::cin, message); for such things.
Generated Documentation for BlindSide's irrNetLite.
"When I heard birds chirping, I knew I didn't have much time left before my mind would go." - clinko
User avatar
wITTus
 
Posts: 167
Joined: Tue Jun 24, 2008 7:41 pm
Location: Germany

Postby Scarabol » Fri Apr 24, 2009 11:04 pm

Why does the server take such a long time to check, that the client is gone?
Is there any logout function?

Greetings
Scarabol
Scarabol
 
Posts: 167
Joined: Sat Jan 03, 2009 5:26 pm
Location: Aachen, Germany

Postby BlindSide » Sat Apr 25, 2009 3:13 am

The server normally doesn't take a long time to check this, it's only if you use a console app like the demos and then close the console, then the client does not get a chance to disconnect properly. If the client deletes the net manager then it will properly severe the connection.

Not sure why ban is not working for you, can I see some source code that demonstrates this problem?

Cheers
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 Scarabol » Sat Apr 25, 2009 8:19 am

I'm sorry i forgot to delete this comment, everything works great, i think i could use it very well :-)

Bug?: If i connect to server the Ping is 400 and decrase slowly to about 7, could i speed up this decrase?

Maybe u could help me with this problem, it has indirectly to do with irrnetlite, because i don't know how to access classes and vars from main in my include???
http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=33348

Greetings
Scarabol
Scarabol
 
Posts: 167
Joined: Sat Jan 03, 2009 5:26 pm
Location: Aachen, Germany

Postby BlindSide » Sun Apr 26, 2009 11:42 am

How odd, that topic seems to have been moved or deleted. Anyway it seems you are lacking some basic C++ knowledge, I recommend reading through http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html.

The problem with the ping is that it is averaged out over a few seconds, so it can take some time to stabilize, I doubt there is much you can do without modifying the Enet sources directly.
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 Nox » Sun Apr 26, 2009 2:57 pm

Well esiest way is to send an own ping packet. But the measured ping may jump heavily.
Nox
 
Posts: 304
Joined: Wed Jan 14, 2009 6:23 pm

Postby Scarabol » Sun May 03, 2009 7:26 pm

Hi,

how may i use long?

Code: Select all
long price; // very expensive ;-) so i need long definitely
packet >> price; // always produce error :-(


Is it possible to group some packets? Like:
Code: Select all
net::SOutPacket masterpacket;
net::SOutPacket packet;
packet << data;
masterpacket << packet;
packet.clearData();
packet << data2;
masterpacket << packet;
// masterpacket should now contain 2 packets and transmit them separated to the client


Greetings
Scarabol
Scarabol
 
Posts: 167
Joined: Sat Jan 03, 2009 5:26 pm
Location: Aachen, Germany

Postby BlindSide » Mon May 04, 2009 12:07 am

That grouping thing was already mentioned, I guess I have to add it in to the next version.

About long, what compiler/arch are you using? Are you compiling for 64-bit systems?

"long" is a pretty ambigous type as alot of systems it's typical synonymous to an int but in this case I suppose it's a 64-bit int like "s64". If I'm not handling s64/u64 I'll have to add it in later but you can add it in yourself just copy the implementation for "f64" (double) and change all f64 to long, it should work pretty much the same if they are the same size. Just make sure of the size on your systems using sizeof(long), you may want to use less ambiguous types such as int64, etc because you'll run into trouble if you're communicating with a 32-bit system.
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!

PreviousNext

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 1 guest