[Opensim-dev] Upcoming work on alternative client stack

Melanie melanie at t-data.com
Mon Aug 18 00:49:51 UTC 2008


Hi,

if the packets are structs/arrays, be careful of boxing issues. You 
would have no advantage from that if you have to eat the boxing 
overhead instead.

Melanie
(Who still thinks we don't need that development)


Mike Mazur wrote:
> Hi Adam,
> 
> On Sun, 17 Aug 2008 14:27:12 -0400
> "Frisby, Adam" <adam at deepthink.com.au> wrote:
> 
>> Please be careful here.
>> 
>> I'm doing some work with the RealXtend guys to move their custom code
>> into a set of Region Modules, however I need the SendPacket(Packet x)
>> function on IClientAPI to do so.
>> 
>> Now admittedly there's only a few custom packets, and we could extend
>> IClientAPI to support them - these are:
>> 
>> 1.       GenericMessagePacket - Rex has moved to using these to
>> overload all their messages onto (so that the existing client ignores
>> them safely), we don't have a IClientAPI.SendGenericMessage(string[]
>> msg) equivalent yet. This could be one way we get around this.
>> 
>> 2.       Convert to SendPacket(Byte[] x), then run
>> GenericMessagePacket.ToBytes() before passing it to IClientAPI?
> 
> I'm not sure I fully understand the issue.
> 
> My changes in IClientAPI is to replace Packet with object:
> 
> IClientAPI:
> -        void InPacket(Packet NewPack);
> +        void InPacket(object NewPack);
> 
> This way the interface doesn't dictate the datatype of the packet, but
> the implementing class does:
> 
> LLClientView (implements IClientAPI):
> -        public virtual void InPacket(Packet NewPack)
> +        public virtual void InPacket(object NewPack)
>          {
> -            m_PacketHandler.InPacket(NewPack);
> +            // Cast NewPack to Packet.
> +            m_PacketHandler.InPacket((Packet) NewPack);
>          }
> 
> Since the interface expects an object, anything can be passed around,
> be it byte[], Packet or GenericMessagePacket.
> 
> Does that still pose any issues for you?
> 
> Mike
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
> 
> 



More information about the Opensim-dev mailing list