return *peer_addr;
}
-unsigned ClientSocket::do_write(const char *buf, unsigned size)
+size_t ClientSocket::do_write(const char *buf, size_t size)
{
check_access(IO::M_WRITE);
if(!connected)
return check_sys_error(::send(priv->handle, buf, size, 0), "send");
}
-unsigned ClientSocket::do_read(char *buf, unsigned size)
+size_t ClientSocket::do_read(char *buf, size_t size)
{
check_access(IO::M_READ);
if(!connected)
if(size==0)
return 0;
- unsigned ret = check_sys_error(::recv(priv->handle, buf, size, 0), "recv");
+ size_t ret = check_sys_error(::recv(priv->handle, buf, size, 0), "recv");
if(ret==0 && !eof_flag)
{
eof_flag = true;
- signal_end_of_file.emit();
set_socket_events(S_NONE);
+ signal_end_of_file.emit();
}
return ret;