haiku/headers/os/net/NetworkRequest.h
Adrien Destugues 89b4e98a8f Move signal hack to BNetworkRequest
* This is used to unlock sockets when a read is pending after a close
* It is not needed on requests that don't use a socket.
2014-08-04 16:25:48 +02:00

43 lines
776 B
C++

/*
* Copyright 2014 Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _B_NET_REQUEST_H_
#define _B_NET_REQUEST_H_
#include <NetBuffer.h>
#include <NetworkAddress.h>
#include <UrlRequest.h>
class BAbstractSocket;
class BNetworkRequest: public BUrlRequest
{
public:
BNetworkRequest(const BUrl& url,
BUrlProtocolListener* listener,
BUrlContext* context,
const char* threadName,
const char* protocolName);
virtual status_t Stop();
protected:
bool _ResolveHostName(uint16_t port);
void _ProtocolSetup();
status_t _GetLine(BString& destString);
protected:
BAbstractSocket* fSocket;
BNetworkAddress fRemoteAddr;
BNetBuffer fInputBuffer;
};
#endif