Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 527219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:51:33+00:00 2026-05-13T08:51:33+00:00

I have been working on an emulator, and it sends a few packets separately,

  • 0

I have been working on an emulator, and it sends a few packets separately, but the client receiving the packets is able to handle multiple packets incoming from a single receive.

Here’s my method:

    /// <summary>
    /// Sends a few packets at login to prepare the character for gameplay.
    /// </summary>
    /// <param name="character">The character to produce frame for.</param>
    public void 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 options
        SendTab(character, 68, 752); // Chatbox
        SendTab(character, 64, 748); // HP bar
        SendTab(character, 65, 749); // Prayer bar
        SendTab(character, 66, 750); // Energy bar
        SendTab(character, 67, 747);
        character.Session.SendData(new ConfigPacketComposer(character, 1160, -1).Serialize());
        SendTab(character, 8, 137); // Playername on chat
        SendTab(character, 73, 92); // Attack tab
        SendTab(character, 74, 320); // Skill tab
        SendTab(character, 75, 274); //  Quest tab
        SendTab(character, 76, 149); // Inventory tab
        SendTab(character, 77, 387); // Equipment tab
        SendTab(character, 78, 271); // Prayer tab
        SendTab(character, 79, 192); // Magic tab
        SendTab(character, 81, 550); // Friend tab
        SendTab(character, 82, 551); // Ignore tab
        SendTab(character, 83, 589); // Clan tab
        SendTab(character, 84, 261); // Setting tab
        SendTab(character, 85, 464); // Emote tab
        SendTab(character, 86, 187); // Music tab
        SendTab(character, 87, 182); // Logout tab
    }

CloseInventory & SendTab methods:

    /// <summary>
    /// Closes the inventory interface.
    /// </summary>
    /// <param name="character">The character to produce frame for.</param>
    public void SendCloseInventoryInterface(Character character)
    {
        character.Session.SendData(new InterfaceConfigPacketComposer(character, 
            (short)(character.Hd ? 746 : 548), 71, true).Serialize());
    }

    /// <summary>
    /// Sends a tab interface.
    /// </summary>
    /// <param name="character">The character to produce frame for.</param>
    /// <param name="tabId">The id of the tab.</param>
    /// <param name="childId">The child if of the tab.</param>
    public void SendTab(Character character, short tabId, short childId)
    {
        character.Session.SendData(new InterfacePacketComposer(character, 1,
            (short)(childId == 137 ? 752 : (character.Hd ? 746 : 548)), 
            tabId, childId).Serialize());
    }

The Serialize() method basically joins the header and the payload togeather.
The SendData() method just sends a byte array via the socket (asynchronously).

As you can see, im sending multiple packets basically at the same time, but in different arrays. My question is what would be more efficient for the server’s stability and performance, sending that method within an array (i have to join each of those arrays into one, then send via network) or send it raw after it’s been composed.

Joining arrays may cause some performance issues, since this is a multi-player server, the more players the server has, the more the server load is. Would sending it separately vs. sending it merged make a difference?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:51:33+00:00Added an answer on May 13, 2026 at 8:51 am

    The more packets you send the more bandwidth gets absorbed by their overhead.

    There are other issues though … i think the choice of udp vs tcpip for sections of data is more important.

    Really you want to be compressing the data as bandwidth and latency is the bottleneck … the costs of decompressing probably will be far less.

    As for the performance question its impossible to answer a priori from what is given.

    Really the problem is a optomisation problem of frequency of packets vs size of packets vs odds of arriving/reduncancy etc (if udp) against the size of the total size of data to send.

    Its not much of an answer im afraid, but any authoritative answer really would be irresponsible.

    Really you are goign to have to perform the experiement.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on a project on and off, but I haven't touched
I have been working with Zend for a few months now and am at
I have been working in C# for quite some time but come around this
I have been working on a new menu and I'm almost there, but the
I have been working with ASP.NET for a few years and am now working
Have been working on this question for a couple hours and have come close
I have been working with SQL Server as a Developer a while. One thing
I have been working on a large java application. It is quite parallel, and
I have been working on this app for at least 3-4 months and just
I have been working on a project in C# (.net4). Project pretty much allows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.