class axl::io::win::Socket

#include <axl_io_win_Socket.h>

class Socket: public axl::sl::Handle
{
public:
    // methods

    bool
    open(
        int addressFamily,
        int sockKind,
        int protocol
        );

    int
    getError();

    bool
    setBlockingMode(bool isBlocking);

    size_t
    getIncomingDataSize();

    bool
    bind(const sockaddr* addr);

    bool
    getAddress(SockAddr* addr);

    bool
    getPeerAddress(SockAddr* addr);

    bool
    getOption(
        int level,
        int option,
        void* p,
        size_t size
        );

    bool
    setOption(
        int level,
        int option,
        const void* p,
        size_t size
        );

    bool
    listen(size_t backLog);

    SOCKET
    accept(SockAddr* addr = NULL);

    bool
    connect(const sockaddr* addr);

    bool
    shutdown(int mode = SD_BOTH);

    size_t
    send(
        const void* p,
        size_t size
        );

    size_t
    recv(
        void* p,
        size_t size
        );

    size_t
    sendTo(
        void* p,
        size_t size,
        const sockaddr* addr
        );

    size_t
    recvFrom(
        void* p,
        size_t size,
        SockAddr* addr
        );

    bool
    wsaOpen(
        int addressFamily,
        int sockKind,
        int protocol,
        dword_t flags = WSA_FLAG_OVERLAPPED
        );

    bool
    wsaEventSelect(
        HANDLE hEvent,
        int mask
        );

    bool
    wsaEnumEvents(
        WSANETWORKEVENTS* events,
        HANDLE hEvent = NULL
        );

    bool
    wsaConnect(const sockaddr* addr);

    SOCKET
    wsaAccept(SockAddr* addr);

    bool
    wsaSend(
        const void* p,
        dword_t size,
        dword_t* actualSize,
        dword_t flags,
        WSAOVERLAPPED* overlapped,
        LPWSAOVERLAPPED_COMPLETION_ROUTINE completionFunc = NULL
        );

    bool
    wsaRecv(
        void* p,
        dword_t size,
        dword_t* actualSize,
        dword_t* flags,
        WSAOVERLAPPED* overlapped,
        LPWSAOVERLAPPED_COMPLETION_ROUTINE completionFunc = NULL
        );

    bool
    wsaSendTo(
        const void* p,
        dword_t size,
        dword_t* actualSize,
        dword_t flags,
        const sockaddr* addr,
        WSAOVERLAPPED* overlapped,
        LPWSAOVERLAPPED_COMPLETION_ROUTINE completionFunc = NULL
        );

    bool
    wsaRecvFrom(
        void* p,
        dword_t size,
        dword_t* actualSize,
        dword_t* flags,
        SockAddr* addr,
        socklen_t* addrSize,
        WSAOVERLAPPED* overlapped,
        LPWSAOVERLAPPED_COMPLETION_ROUTINE completionFunc = NULL
        );

    bool
    wsaIoctl(
        dword_t ioctlCode,
        const void* inBuffer,
        dword_t inBufferSize,
        void* outBuffer,
        dword_t outBufferSize,
        dword_t* actualSize,
        WSAOVERLAPPED* overlapped,
        LPWSAOVERLAPPED_COMPLETION_ROUTINE completionFunc = NULL
        );

    bool
    wsaGetOverlappedResult(
        WSAOVERLAPPED* overlapped,
        dword_t* actualSize,
        dword_t* flags = NULL
        ) const;

    size_t
    wsaGetOverlappedResult(WSAOVERLAPPED* overlapped) const;
};

Inherited Members

public:
    // typedefs

    typedef T H;

    // methods

    operator T() const;

    T
    operator->() const;

    const Handle&
    operator=(T h);

    bool
    isOpen() const;

    void
    close();

    void
    attach(T h);

    T
    detach();

    T*
    p();

    static
    T
    getInvalidHandle();