1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-03 14:33:32 +03:00

Import from yaSSL

Fixes for HPUX etc. 
Don't define exceptions operator new on hpux as the linker will look for the function
This commit is contained in:
msvensson@shellback.(none)
2006-05-22 15:49:57 +02:00
parent b9cd71e622
commit a401734c07
20 changed files with 362 additions and 34 deletions

View File

@@ -66,6 +66,7 @@ typedef unsigned char byte;
// Wraps Windows Sockets and BSD Sockets
class Socket {
socket_t socket_; // underlying socket descriptor
bool wouldBlock_; // for non-blocking data
public:
explicit Socket(socket_t s = INVALID_SOCKET);
~Socket();
@@ -75,9 +76,10 @@ public:
socket_t get_fd() const;
uint send(const byte* buf, unsigned int len, int flags = 0) const;
uint receive(byte* buf, unsigned int len, int flags = 0) const;
uint receive(byte* buf, unsigned int len, int flags = 0);
bool wait() const;
bool wait();
bool WouldBlock() const;
void closeSocket();
void shutDown(int how = SD_SEND);