Iris2.de http://iris2.de/forum/ |
|
In Trouble With Packets ?? http://iris2.de/forum/viewtopic.php?f=15&t=1406 |
Page 1 of 1 |
Author: | Sehlor [ Fri May 22, 2009 8:35 am ] |
Post subject: | In Trouble With Packets ?? |
Tyrin To Implement A Custom Package But Can't.. I Can Sent A Package Client to Server but Can't Send Server to Client... Following That Way: lib.packet.lua adding: Code: gPacketType.kPacket_Verification_Request = { id=0xFA, size=2 } and net.other.lua adding: Code: function gPacketType.kPacket_Verification_Request() print("######################### Verification Requested"); end And Server Side Code: public sealed class VerificationRequest : Packet { public VerificationRequest() : base(0xFA, 2) { Console.WriteLine("Sending Verification Request."); m_Stream.Write((bool)true); m_Stream.Fill(); } } //And Sending Packet To Client. Code: static void EventSink_Login(LoginEventArgs e)
{ e.Mobile.Send(new VerificationRequest()); } Console Outputs: Sending Verification Request. But Client Command Output Is Not Working, it must be: ######################### Verification Requested Where I'm Doing Wrong? Regards. |
Author: | hagish [ Fri May 22, 2009 10:26 am ] |
Post subject: | |
try Code: function gPacketHandler.kPacket_Verification_Request() instead of Code: function gPacketType.kPacket_Verification_Request()
|
Author: | ghoulsblade [ Fri May 22, 2009 3:24 pm ] |
Post subject: | |
you have to pop the messaga data completely in the packet handler. also instead of introducing new fixed size packets, i'd recommend using new subpackets of 0xBF , see iris/lua/net/net.generic.lua for those. |
Author: | Sehlor [ Fri May 22, 2009 6:46 pm ] |
Post subject: | |
thanks for replies resolved. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |