Find Jobs
Hire Freelancers

Data Packet Queue

$30-250 USD

Completed
Posted over 8 years ago

$30-250 USD

Paid on delivery
We have recently discovered that our Android app is overloading our server, now that our user base has increased. To alleviate this problem, we need to throttle back on the data we are sending to the server so that we send no more than 1024 bytes at a time, and no more often than 30 times per second. Our packets are guaranteed to be no larger than 800 bytes each, and must be sent in their entirety. You may assume that no packet is of higher priority than any other packet. Each packet will need a header in network byte order that contains the string “PKT_”, followed by a 4-byte unsigned integer that gives the packet size, not including the header. Packets can be concatenated together for a single network send via TransmitData(). Any packets that cannot be sent must be queued up until the next opportunity to send them. Implement PacketManager with the packet throttling described above to handle this situation. We will call the PacketManager’s Update() method on a semi-regular basis, and pass it a floating point parameter that specifies the amount of time in seconds that has elapsed since the last time we called it. A NetworkConnection class exists that implements the method to send data to the server. You can assume the connection to the server and any user authentication has already been handled. In C++ your prototypes would be: // This class is already implemented, and may be called by your code. class NetworkConnection { public: static void TransmitData (unsigned char * dataHead, int dataSize); }[g] // You can start with this class and expand it as needed. class PacketManager { public: void Update (float secondsSinceLastUpdate); void Send (unsigned char * packetHead, int packetSize); }
Project ID: 8179919

About the project

2 proposals
Remote project
Active 9 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hello I'm interesting your project very well I'm a Good C/C++, Java, Algorithm expert. I understand your req exactly. I m quite well experienced in these jobs. Let's go ahead with me I want to service for you continously. Thanks
$150 USD in 2 days
4.9 (148 reviews)
7.0
7.0
2 freelancers are bidding on average $153 USD for this job
User Avatar
Hello. How are you? I saw your description . I understand it and can do it well. I have done several project like this. I'm an expert in Data Structures and Algorithms. And I know Java ,C/C++ and Python well. I'm interested this project. I want to discuss with you about this project. If it's possible,please contact me and explain more detail. I wait your good reply. Bye. Huang
$105 USD in 2 days
4.9 (35 reviews)
4.2
4.2
User Avatar
Hi, I work on linux and have a cross compiler for Android. I am a network programmer for some local business here in Nyc where I live.
$155 USD in 3 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
dallas, United States
5.0
21
Payment method verified
Member since Sep 11, 2013

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.