mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
Let's always have timeouts. This timeout is reset even when a single byte is sent, so it's pretty generous.
19 lines
349 B
C++
19 lines
349 B
C++
#pragma once
|
|
|
|
#include "Common/Buffer.h"
|
|
|
|
namespace net {
|
|
|
|
class Buffer : public ::Buffer {
|
|
public:
|
|
bool FlushSocket(uintptr_t sock, double timeout, bool *cancelled = nullptr);
|
|
|
|
bool ReadAllWithProgress(int fd, int knownSize, float *progress, bool *cancelled);
|
|
|
|
// < 0: error
|
|
// >= 0: number of bytes read
|
|
int Read(int fd, size_t sz);
|
|
};
|
|
|
|
}
|