MLIB
Loading...
Searching...
No Matches
wsockstream.h File Reference

Definition of sock and sockstream classes. More...

#include "safe_winsock.h"
#include <iostream>
#include <mlib/errorcode.h>
#include <mlib/inaddr.h>
#include <assert.h>

Go to the source code of this file.

Data Structures

class  mlib::sock
 Encapsulation of a Windows socket. More...
 
class  mlib::sockbuf
 Provide functions required by streambuf interface using an underlying socket. More...
 
class  mlib::generic_sockstream< strm >
 An IO stream using a sockbuf object as the underlying streambuf. More...
 
struct  mlib::sock_initializer
 Keeps an instance counter for calls to WSAStartup/WSACleanup.
 

Macros

#define SOCKBUF_BUFSIZ   1024
 

Typedefs

typedef generic_sockstream< std::istream > mlib::isockstream
 Input socket stream.
 
typedef generic_sockstream< std::ostream > mlib::osockstream
 Output socket stream.
 
typedef generic_sockstream< std::iostream > mlib::sockstream
 Bidirectional socket stream.
 

Functions

std::ostream & mlib::operator<< (std::ostream &strm, const sock &s)
 Extraction operator shows socket handle.
 
sock::mflags mlib::operator| (sock::mflags f1, sock::mflags f2)
 Bitwise OR operator for send message flags.
 

Detailed Description

Definition of sock and sockstream classes.