functions for manipulating packets
This commit is contained in:
parent
1a58294f88
commit
d215f7199e
9 changed files with 81 additions and 37 deletions
|
@ -16,7 +16,12 @@ int main(void) {
|
|||
if (command == NULL)
|
||||
return 1;
|
||||
|
||||
sp_connection_send_command(connection, command);
|
||||
Packet *packet = sp_packet_from_command(command);
|
||||
|
||||
Header *header = sp_packet_get_header(packet);
|
||||
printf("[%d, %d, %d, %d, %d]\n", header->command_code, header->a, header->b, header->c, header->d);
|
||||
|
||||
sp_connection_send_packet(connection, packet);
|
||||
|
||||
sp_connection_free(connection);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue