C
C#3y ago
euphxria

how to get client server lag of 2 machines running on the local network

title
70 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
bruh i have a tcp connection i mean a tcp server and i connect to it via the local network from my iphone
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
i need to get the latency in how long it took for the server to reach the phone
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
the server is a c# server running on a windows machine
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
i dont get how to do it
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
i know how to get how long it takes for the iphone to reply but i dont get how to calculate how long it took for the first message to reach the phone
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
then what
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
their clocks are different i need to get it synced up to the 0.001 millisecond
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
so send msg to iphone iphone send message back
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
i dont really understand
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
yes
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
but whats counting the server
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
ok that gets server to client to server time
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
but i need server to client time
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
if the clock is running on the server and it only stops
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
when the client sends a message back
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
no sir you are dumb what dont you understand SERVER TO CLIENT
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
how do you sync it up if each machine has a unique clock
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
yes
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
im listening ok sir
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
ok so you start lets say at epoch time 0 then you end at 3
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
ok what do you use
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
what do you use then
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
ok so you just add delta time each frame which is stopwatch so lets say the stopwatches total is 3 how do you extract the server to client from that ?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
ok so how do you extract server to client
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
divide the total by 2? idk
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
so you cant get client to server time
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
well thats essentially what i need
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
should i switch to udp for a lower latency
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
no no i get it thank you should i switch to udp for lower latency i need to minmise latency that would be nice
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
well i mean im trying to sync the iphone camera to my computer basically
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
even on the local network?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
what if you like disconeect from the internet
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
or like idk disconnect from like the public interent
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
euphxria
euphxriaOP3y ago
ill do a ping i think its like 3 ms if i could i would use a usb cable to sync data but apple doesnt allow that
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server