I am working on an emulator, and sends some packets separately, but the customer receiving the packet receives Enabled Many packets received from one are coming.
Here's my method:
/// & lt; Summary & gt; /// For sending the character for the gameplay sends some packets on the log. /// & lt; / Summary & gt; /// & lt; Param name = "character" & gt; The character that created the frame for & Lt; / Param & gt; Public Zero SendLoginWelcome (Character Character) {character.Session.SendData (New NewMapRegionPacketComposer (Character). Serialize ()); WelcomeScreen.Show (character); SendCloseInventoryInterface (character); SendTab (Character, 6, 745); SendTab (Character, 7, 754); SendTab (Character, 11, 751); // Chat option SendTab (Character, 68, 752); // Chatbox Sendab (Character, 64, 748); // HP Bar Sandsbyb (Character, 65, 749); // Prayer Bar SendTab (Character, 66, 750); // Energy Bar Sandbab (Character, 67, 747); Character. Session Sandadata (new config pocket composer (Character, 1160, -1). Serialize ()); SendTab (Character, 8, 137); Chat playback on chat (Character, 73, 92); // Invasion tab SendTab (Character, 74, 320); // Skill Tab SendTab (Character, 75, 274); // Search tab SendTab (Character, 76, 149); // Inventory tab, SendTab (Character, 77, 387); // Tools tab, SendTab (Character, 78, 271); // prayer tab SendTab (Character, 79, 192); // Magic Tab, SendTab (Character, 81, 550); // Friends Tab SendTab (Character, 82, 551); Leave on the // tab and sendTab (Character, 83, 589); // Clan tab, SendTab (Character, 84, 261); // Setting the Tab Setting Tab (Character, 85, 464); // Send Tab Tab Tab (Character, 86, 187); // Music Tab, SendTab (Character, 87, 182); // logout tab}
CloseInventory & amp; SendTab methods:
/// & lt; Summary & gt; /// inventory closes the interface. /// & lt; / Summary & gt; /// & lt; Param name = "character" & gt; The character that created the frame for & Lt; / Param & gt; Public Zero SendCloseInventoryInterface (Character Character) {character.Session.SendData (New Interface Config Packet Composer (Character, (Short) (Character. HD? 746: 548), 71, True) .Serialize ()); } /// & lt; Summary & gt; /// sends a tab interface /// & lt; / Summary & gt; /// & lt; Param name = "character" & gt; The character that created the frame for & Lt; / Param & gt; /// & lt; Param name = "tabId" & gt; Tab id & Lt; / Param & gt; /// & lt; Param name = "childId" & gt; If the child of the tab. & Lt; / Param & gt; Public Zero SendTab (Character Character, Short Tab ID, Short ChildId) {character.Session.SendData (New Interface Packet Composer (Character, 1, (Short) (childId == 137? 752: (character.Hd? 746: 548) ), TabID, ChildID). Serialize ()); }
The serialize ()
method basically gets in the header and payload tojender SendData ()
method just by socket (asynchronous) The byte array sends.
As you can see, basically sending several packets at the same time, but in different arrays. My question is, what would be more efficient for the stability and performance of the server, sending that method within an array (I must include each of them, then send it through the network) or after it was created Send it raw.
By joining the ARM, there may be some performance problems, because it is a multi-player server, the more players the server is, the more the server loads it has to be sent separately. Dissolve it to make a difference?
The more packets you send, the more bandwidth is absorbed from your upper part.
Although there are other issues ... I think that udp versus TCPIP is more important for sections of data.
In fact, you want to convey the data as bandwidth and the latency is hampered ... the cost of decompressing might be much less.
Whatever is given for the display question, it is impossible to answer the priority.
In fact the issue of packet frequency is an optimization problem
The answer is not too much, but any official answer will actually be I. Beyond
Actually you are responsible for the experiment.
No comments:
Post a Comment