add fn to pass ip:port as values
This commit is contained in:
parent
5eed5ecde2
commit
bbe4000468
3 changed files with 46 additions and 14 deletions
|
@ -979,13 +979,32 @@ void sp_connection_free(UdpConnection */*notnull*/ connection);
|
|||
* # Examples
|
||||
*
|
||||
* ```C
|
||||
* CConnection connection = sp_connection_open("172.23.42.29:2342");
|
||||
* UdpConnection connection = sp_connection_open("172.23.42.29:2342");
|
||||
* if (connection != NULL)
|
||||
* sp_connection_send_command(connection, sp_command_clear());
|
||||
* ```
|
||||
*/
|
||||
UdpConnection *sp_connection_open(char */*notnull*/ host);
|
||||
|
||||
/**
|
||||
* Creates a new instance of [UdpConnection].
|
||||
*
|
||||
* returns: NULL if connection fails, or connected instance
|
||||
*
|
||||
* # Examples
|
||||
*
|
||||
* ```C
|
||||
* UdpConnection connection = sp_connection_open_ipv4(172, 23, 42, 29, 2342);
|
||||
* if (connection != NULL)
|
||||
* sp_connection_send_command(connection, sp_command_clear());
|
||||
* ```
|
||||
*/
|
||||
UdpConnection *sp_connection_open_ipv4(uint8_t ip1,
|
||||
uint8_t ip2,
|
||||
uint8_t ip3,
|
||||
uint8_t ip4,
|
||||
uint16_t port);
|
||||
|
||||
/**
|
||||
* Sends a [TypedCommand] to the display using the [UdpConnection].
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue