Checking sent packets on a real-time network using SFML

I am creating a network program that transfers graphic changes to a 2D screen with UDP SFML libraries.

I want to work with all processes on the host server and send updates and commands that return values ​​only to the client.

I want to make a validation condition before sending data to screens on both sides of the connection. I was thinking of sending one byte as 0 or 1 to represent successful data reception and synchronization.

(see chart)

    Server-------( updates )----->Client  
       |                             |  
  ( wait for )<---( 1 or 0 )-----Send Byte  
       |                             |  
    ( if 1 )                ( if byte received )  
       |                             |  
    Screen                        Screen  

It seems logical to ping back and forth to make sure that the data has been checked at both ends before updating the screen and then subsequently starting another iteration of the same thing (indefinitely, of course).

SFML, 1/0, , .. ?

, , - , ? , FPS?

SFML, , .

+2
1

TCP UDP, TCP?

UDP, ( , , TCP, , ), // ( ), , .

  • , .
  • , ( , )
  • resent, . ( )

, , , .

  • ( ), .
  • , .

, , .

, .

,

, , , . , .

. , . , . , , .

.

, , / , . , . , , .

, , .

, , TCP UDP?

, .

UDP

, , UDP . , , , .

TCP

, , 60 , , , , TCP .

, , , localhost.

+3

All Articles