refactoring + cancellation was buggy during http upgrade
This commit is contained in:
@ -14,8 +14,6 @@
|
||||
#include "IXEventFd.h"
|
||||
#include "IXCancellationRequest.h"
|
||||
|
||||
struct addrinfo;
|
||||
|
||||
namespace ix
|
||||
{
|
||||
class Socket {
|
||||
@ -41,6 +39,13 @@ namespace ix
|
||||
virtual int send(const std::string& buffer);
|
||||
virtual int recv(void* buffer, size_t length);
|
||||
|
||||
// Blocking and cancellable versions, working with socket that can be set
|
||||
// to non blocking mode. Used during HTTP upgrade.
|
||||
bool readByte(void* buffer,
|
||||
const CancellationRequest& isCancellationRequested);
|
||||
bool writeBytes(const std::string& str,
|
||||
const CancellationRequest& isCancellationRequested);
|
||||
|
||||
int getErrno() const;
|
||||
static bool init(); // Required on Windows to initialize WinSocket
|
||||
static void cleanup(); // Required on Windows to cleanup WinSocket
|
||||
|
Reference in New Issue
Block a user