1
2
Oct 24 2016, 3:43 pm
|
|
Lummox JR resolved issue with message:
|
In response to Somepotato
|
|
Somepotato wrote:
Hello! Received @ (46.134); Delta: 0.037999999999997; time since accept: 0.102 Delta is the time between messages -- its actually decently quicker. Good job Lummox! |
One thing I need to mention here: Although the way messages are sent has vastly improved, world.Export() will still send, receive, send, receive, etc. if it has requests stacked up. There was simply no other good way to handle it in the short term. In the longer term, I'd like to improve that so it can send a bunch of stuff at once, as long as it doesn't end up creating a spam problem.
|
In response to Lummox JR
|
|
Lummox JR wrote:
One thing I need to mention here: Although the way messages are sent has vastly improved, world.Export() will still send, receive, send, receive, etc. if it has requests stacked up. There was simply no other good way to handle it in the short term. In the longer term, I'd like to improve that so it can send a bunch of stuff at once, as long as it doesn't end up creating a spam problem. It might not be a bad idea to buffer data or allow for firing and forgetting with a parameter on Export. I don't see how you could sanely queue up requests given that its blocking and whatnot in not softcode anyway so I think for now its fine. |
In response to Somepotato
|
|
Queuing can happen if you spawn off a request, like I did quite a bit in testing. Also if multiple procs did an Export(), like B sending while A was still waiting for its response, it'd work the same way.
This queuing however does not wait for the proc tick, so that's a good thing at least. As soon as a response is received, the socket calls TransmisionReturn() which pushes the sleeping proc back onto the list to activate on the next tick, and then sends out the next request to the remote server. So in theory with a fast connection you could get a lot of back-and-forth on a single tick, if a lot of things were queued up. |
In response to Lummox JR
|
|
Lummox JR wrote:
Queuing can happen if you spawn off a request, like I did quite a bit in testing. Also if multiple procs did an Export(), like B sending while A was still waiting for its response, it'd work the same way. Alright that'll make using it a little smarter implementation wise. One downside though is that it'll hang procs for a very long time if the server doesn't return or it can't connect to the server. This behavior should probably be changed. |
1
2