-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cute_Net.h] Knowing if a packet has been sent. #367
Comments
Hi there! Thanks for the suggestion. To clarify, you're mainly asking for a way to see if the "send queue" for your client is actually empty or not? This would be a very easy thing to add. |
Oh yeah, exactly what i had in mind, i remember seeing the But i didn't know if what i have in mind is going to work:
In fact imma give it a try once i get home. Also: my deepest apologies for the bothering and the delayed response (went to sleep after creating the issue) Update: went to check the buffer size with Output:
|
Not exactly what i had in mind but it does the job:
This code works but with certain delay between sends, so i need to adjust this for this to perform better. Note: it's worth to mention that i took this snippet from the example, just out of nowhere haha. |
Hello there, my deepest apologies for the bothering, but i came to ask something and maybe suggest something.
I am quite new to this network thing, my apologies if i say or do something wrong.
I walked through the examples and after a while messing with them i went to create a class for both Server and Client and implement on my Debugger project.
Everything was fine until i went to test the client class. It works, but there's something wrong.
Look at this:
Ok, the concept for this code is, Create a client, connects to the localhost, sends an string to the server, then disconnect and then end the program.
Now let's go to the server output:
Where is the message is the client send?
Problem is, i call to
c.Shutdown()
anddone = true
right after "sending" the message, which cancels the next call ofc.Process()
and with that the message i just sent didn't get processed.Took me a while to find this out (yup, dumb me), but still something like:
bool cn_client_packet_pending(client)
or
bool cn_client_packet_send(client)
would be very useful.Example:
The second one would be quite harder to implement, since it would need a server response i suppose, but the first one i think it would be easier to do, i would implement it myself but i don't know how this would work and the nuances behind it.
Well, i think this is it, my deep apologies for the bothering and thanks for reading.
Have a great night.
The text was updated successfully, but these errors were encountered: