xref: /haiku/headers/os/net/SecureSocket.h (revision 820dca4df6c7bf955c46e8f6521b9408f50b2900)
1 /*
2  * Copyright 2011, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _SECURE_SOCKET_H
6 #define _SECURE_SOCKET_H
7 
8 
9 #include <Socket.h>
10 
11 
12 class BSecureSocket : public BSocket {
13 public:
14 								BSecureSocket();
15 								BSecureSocket(const BNetworkAddress& peer,
16 									bigtime_t timeout = B_INFINITE_TIMEOUT);
17 								BSecureSocket(const BSecureSocket& other);
18 	virtual						~BSecureSocket();
19 
20 	virtual	status_t			Connect(const BNetworkAddress& peer,
21 									bigtime_t timeout = B_INFINITE_TIMEOUT);
22 	virtual	void				Disconnect();
23 
24 	virtual	status_t			WaitForReadable(bigtime_t timeout
25 										= B_INFINITE_TIMEOUT) const;
26 
27 	// BDataIO implementation
28 
29 	virtual ssize_t				Read(void* buffer, size_t size);
30 	virtual ssize_t				Write(const void* buffer, size_t size);
31 
32 private:
33 			class Private;
34 			Private*			fPrivate;
35 };
36 
37 
38 #endif	// _SECURE_SOCKET_H
39