Commit Graph

23 Commits

Author SHA1 Message Date
John Hurliman
d0a9c6401f Resolving [LIBOMV-567]. libomv now throws a helpful error and a stack trace when a packet cannot be serialized because of null blocks
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2886 52acb1d6-8a22-11de-b505-999d5b087335
2009-06-15 17:42:35 +00:00
John Hurliman
e3adf7b02f Cleaned up Packet.FromBytes() to make it clear where the zerodecoding is happening and to skip a redundant check
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2879 52acb1d6-8a22-11de-b505-999d5b087335
2009-06-12 00:50:43 +00:00
John Hurliman
7a8938c5fd * Fixed incorrect Length calculations for variable fields and variable blocks
* Don't generate ToBytesMultiple() routines that create corrupted packets. This means no automatic packet splitting for AgentSetAppearance, SimStats, AvatarGroupsReply, and CoarseLocationUpdate packets

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2823 52acb1d6-8a22-11de-b505-999d5b087335
2009-05-27 22:24:11 +00:00
John Hurliman
f1e8fd4fe8 Major rewrite of the packet sending code:
* Automatic packet splitting. You can send packets with any number of blocks and the networking layer will split them up automatically
* Less memory is allocated for outgoing packet buffers
* Memory is only allocated for zerocoding (outgoing and incoming) when it is needed
* A lockless queue is used to hold outgoing ACKs
* ACKs are stuffed into packets until they hit the MTU
* All outgoing packets are serialized exactly once, instead of serializing every resend
* Improved the clarity of the networking layer (I will upload a flow chart of packet sending soon)

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2800 52acb1d6-8a22-11de-b505-999d5b087335
2009-05-22 19:54:00 +00:00
Latif Khalifa
dcb7da5a24 * [LIBOMV-549] Added Packet.ToBytesMultiple() class that will automatically split a packet with variable blocks up into multiple packets that fit in the MTU (1200). Unit test is included. This is not actually being used by the library anywhere (yet), but hopefully it will be soon
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2799 52acb1d6-8a22-11de-b505-999d5b087335
2009-05-22 00:09:22 +00:00
John Hurliman
5f20603374 * Small performance tweaks to packet classes
* Fixed a recursive locking problem when running UDPBase in server mode

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2788 52acb1d6-8a22-11de-b505-999d5b087335
2009-05-20 19:21:30 +00:00
John Hurliman
2520b6d0ea * Adding a LocklessQueue collection to OpenMetaverseTypes
* Fixing minor compile warnings

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2772 52acb1d6-8a22-11de-b505-999d5b087335
2009-05-16 09:12:12 +00:00
Jim Radford
1ac746c3f2 LIBOMV-501 Pass 2: Cleanup of compile time warnings
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2714 52acb1d6-8a22-11de-b505-999d5b087335
2009-05-08 07:45:28 +00:00
John Hurliman
79beceeb1d * Rewrote the Header class as a struct and optimize for speed. This shouldn't be a breaking change for most apps, but GridProxy and WinGridProxy will need to be tested as thoroughly as possible. Important to note is that Packet.Header.AckList can be null now
* 404 checking in SeedRequestCompleteHandler
* A few new big endian conversion methods in Utils

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2709 52acb1d6-8a22-11de-b505-999d5b087335
2009-05-08 06:38:28 +00:00
John Hurliman
5cbdc8fdd0 Adding Packet.Length to get the length of a packet without serializing to bytes
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2537 52acb1d6-8a22-11de-b505-999d5b087335
2009-03-25 20:19:25 +00:00
John Hurliman
ac354b5fb0 * Cleaned up GetBytes/ToBytes in OMV types to eliminate duplicate code
* Fixed a typo in the previous commit for Utils.EmptyBytes
* Switched _Packets_.cs over to the new ToBytes() functions, should significantly reduce the number of temporary byte arrays allocated

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2471 52acb1d6-8a22-11de-b505-999d5b087335
2009-03-06 01:55:22 +00:00
John Hurliman
9b1e82bc34 [LIBOMV-430] Applying patch from Mike Mazur to zero out extra data from previously processed packets
git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2443 52acb1d6-8a22-11de-b505-999d5b087335
2009-02-17 19:09:22 +00:00
John Hurliman
344d327a15 * Removed all strings from _Packets_.cs, including warning messages for null arrays and Packet.ToString(). GridProxy needs a new Packet.ToString() method that uses reflection now
* Fixed foliage decoding and removed OnNewFoliage in favor of OnNewPrim only
* Flexi, light, sculpt, and object properties (all inside of Primitive) are now classes that can be null instead of structs
* Added Primitive.GetExtraParamsBytes()
* Massive improvements to Simian and periscope

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2384 52acb1d6-8a22-11de-b505-999d5b087335
2008-12-18 21:45:38 +00:00
John Hurliman
aede2ea203 * Adding Packet.BuildPacket() function back, OpenSim uses it
* Converted ParcelAccessEntry.Flags to AccessList enum

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2359 52acb1d6-8a22-11de-b505-999d5b087335
2008-11-17 20:29:13 +00:00
John Hurliman
2e4aa31e4a * Remove an unused BuildPacket function in _Packets_.cs
* Make all blocks inherit from the abstract base class PacketBlock

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2278 52acb1d6-8a22-11de-b505-999d5b087335
2008-10-08 17:08:17 +00:00
John Hurliman
28d7cbeb07 * Big cleanup of UtilsConversions.cs, added functions to go straight from data types to an existing byte array
* Changed _Packets_.cs to use Utils functions for going to and from bytes

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2271 52acb1d6-8a22-11de-b505-999d5b087335
2008-10-07 03:04:03 +00:00
John Hurliman
451015b674 Removing ResendCount and TickCount from Packet class, moved to OutgoingPAcket struct. This is necessary to prevent big problems when sending the same packet to multiple destinations
git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2204 52acb1d6-8a22-11de-b505-999d5b087335
2008-09-08 23:57:31 +00:00
John Hurliman
cfb75b85b0 * Fixed mapgenerator bug caused by types name change
* Fixed mapgenerator bug causing all packets to default to Unencoded
* Added Helpers.BytesToInt()
* Fixed endian problem in Helpers.BytesToUIntBig()
* Fixed LoginResponseData.ToXmlRpc() to return non-broken inventory skeleton
* Added EstateAssetType and TransferError enums
* Changed an Asset constructor to also take an AssetID

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2124 52acb1d6-8a22-11de-b505-999d5b087335
2008-08-20 22:46:28 +00:00
John Hurliman
bfa6f6ca3f Applying patches from [LIBOMV-288] to completely redo the InventoryManager system, hopefully for great justice
git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@2021 52acb1d6-8a22-11de-b505-999d5b087335
2008-07-29 21:36:53 +00:00
John Hurliman
81e6342d36 Removing LL prefix from all basic types
git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1998 52acb1d6-8a22-11de-b505-999d5b087335
2008-07-25 05:15:05 +00:00
John Hurliman
ec028a6dbf Removed circular reference in mapgenerator, it is a fully independent program now
git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1978 52acb1d6-8a22-11de-b505-999d5b087335
2008-07-23 19:04:41 +00:00
John Hurliman
61cce6e15b Continued work on [LIBOMV-319], convert libopenmv to use Prebuild
git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1966 52acb1d6-8a22-11de-b505-999d5b087335
2008-07-23 01:04:45 +00:00
John Hurliman
f2dde3daae Moving examples, mapgenerator, and VisualParamGenerator to Programs folder (SVN is seriously ruined still, don't check out yet)
git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1961 52acb1d6-8a22-11de-b505-999d5b087335
2008-07-22 23:21:49 +00:00