Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Fiedler <glenn@networknext.com>
  • Loading branch information
gafferongames authored Dec 27, 2023
1 parent c6c33a1 commit a1f38e8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,21 @@ static int process_packet( void * context, uint64_t id, uint16_t sequence, uint8
}
```
Now you can send packets through the endpoints:
And for each packet you receive from your socket, call this on the corresponding endpoint:
```c
uint8_t packet[8];
memset( packet, 0, sizeof( packet ) );
reliable_endpoint_send_packet( endpoint, packet, sizeof( packet ) );
reliable_endpoint_receive_packet( endpoint, packet_data, packet_bytes );
```

And for each packet you receive from your socket, call this on the corresponding endpoint:
Now you can send packets through the endpoint:

```c
reliable_endpoint_receive_packet( endpoint, packet_data, packet_bytes );
uint8_t packet[8];
memset( packet, 0, sizeof( packet ) );
reliable_endpoint_send_packet( endpoint, packet, sizeof( packet ) );
```
Now the process packet will be called for each packet received by the endpoint, and you can get acks for any packets sent through an endpoint like this:
And the process packet will be called for each packet received by the endpoint, and you can get acks for packets sent through an endpoint like this:
```c
int num_acks;
Expand Down

0 comments on commit a1f38e8

Please sign in to comment.