mirror of
https://github.com/Kiritow/GSock.git
synced 2024-03-22 13:10:51 +08:00
sendall now supports string
This commit is contained in:
parent
e527e931ff
commit
bd3bd376f6
|
@ -58,6 +58,12 @@ int sock_helper::sendall(const void* ptr, int datasz)
|
|||
return sendall(ptr, datasz, x);
|
||||
}
|
||||
|
||||
int sock_helper::sendall(const std::string& data)
|
||||
{
|
||||
int x;
|
||||
return sendall(data.data(), data.size(), x);
|
||||
}
|
||||
|
||||
int sock_helper::recvall(void* ptr, int length_to_recv)
|
||||
{
|
||||
int x;
|
||||
|
|
|
@ -15,6 +15,7 @@ class sock_helper
|
|||
public:
|
||||
sock_helper(sock&);
|
||||
|
||||
int sendall(const std::string& data);
|
||||
int sendall(const void* ptr, int datasz);
|
||||
int sendall(const void* ptr, int datasz, int& bytes_sent);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user