vfs: check userland buffers before reading them.
[haiku.git] / headers / os / net / NetworkRequest.h
blobf4ab01529a10ee65f68518d013db26309733936d
1 /*
2 * Copyright 2014 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _B_NET_REQUEST_H_
6 #define _B_NET_REQUEST_H_
9 #include <NetBuffer.h>
10 #include <NetworkAddress.h>
11 #include <UrlRequest.h>
14 class BAbstractSocket;
17 class BNetworkRequest: public BUrlRequest
19 public:
20 BNetworkRequest(const BUrl& url,
21 BUrlProtocolListener* listener,
22 BUrlContext* context,
23 const char* threadName,
24 const char* protocolName);
26 virtual status_t Stop();
27 virtual void SetTimeout(bigtime_t timeout);
29 protected:
30 bool _ResolveHostName(BString host, uint16_t port);
32 void _ProtocolSetup();
33 status_t _GetLine(BString& destString);
35 protected:
36 BAbstractSocket* fSocket;
37 BNetworkAddress fRemoteAddr;
39 BNetBuffer fInputBuffer;
43 #endif