AP_HAL: improved constness of Socket API
This commit is contained in:
parent
8f0e7e0693
commit
4411c1fed4
@ -98,7 +98,7 @@ void SocketAPM::set_blocking(bool blocking)
|
||||
/*
|
||||
send some data
|
||||
*/
|
||||
ssize_t SocketAPM::send(void *buf, size_t size)
|
||||
ssize_t SocketAPM::send(const void *buf, size_t size)
|
||||
{
|
||||
return ::send(fd, buf, size, 0);
|
||||
}
|
||||
@ -106,7 +106,7 @@ ssize_t SocketAPM::send(void *buf, size_t size)
|
||||
/*
|
||||
send some data
|
||||
*/
|
||||
ssize_t SocketAPM::sendto(void *buf, size_t size, const char *address, uint16_t port)
|
||||
ssize_t SocketAPM::sendto(const void *buf, size_t size, const char *address, uint16_t port)
|
||||
{
|
||||
struct sockaddr_in sockaddr;
|
||||
make_sockaddr(address, port, sockaddr);
|
||||
|
@ -39,8 +39,8 @@ public:
|
||||
void reuseaddress();
|
||||
void set_blocking(bool blocking);
|
||||
|
||||
ssize_t send(void *pkt, size_t size);
|
||||
ssize_t sendto(void *buf, size_t size, const char *address, uint16_t port);
|
||||
ssize_t send(const void *pkt, size_t size);
|
||||
ssize_t sendto(const void *buf, size_t size, const char *address, uint16_t port);
|
||||
ssize_t recv(void *pkt, size_t size, uint32_t timeout_ms);
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user