haiku/headers/private/netservices/NetworkRequest.h
Niels Sascha Reedijk 70b63f18b3 netservices: remove all old conditional code
Change-Id: Idf3773c081ce103647c5dbea6e82c22bfc5606c9
2021-09-11 13:08:11 +01:00

54 lines
957 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;
namespace BPrivate {
namespace Network {
class BNetworkRequest: public BUrlRequest
{
public:
BNetworkRequest(const BUrl& url,
BDataIO* output,
BUrlProtocolListener* listener,
BUrlContext* context,
const char* threadName,
const char* protocolName);
virtual status_t Stop();
virtual void SetTimeout(bigtime_t timeout);
protected:
bool _ResolveHostName(BString host, uint16_t port);
void _ProtocolSetup();
status_t _GetLine(BString& destString);
protected:
BAbstractSocket* fSocket;
BNetworkAddress fRemoteAddr;
BNetBuffer fInputBuffer;
};
} // namespace Network
} // namespace BPrivate
#endif