Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

aiosock.cpp File Reference

#include "osdetect.h"
#include "base/list.hpp"
#include "aiosock/aiosock.h"
#include "base/map.hpp"
#include "base/stack.hpp"
#include "base/memory.hpp"
#include "base/common.hpp"

Go to the source code of this file.

Defines

#define SO_UPDATE_ACCEPT_CONTEXT   0x700B
#define SO_UPDATE_CONNECT_CONTEXT   0x7010

Typedefs

typedef BOOL(PASCAL * PCONNECTEX )(SOCKET s, const struct sockaddr *name, int namelen, PVOID lpSendBuffer, DWORD dwSendDataLength, LPDWORD lpdwBytesSent, LPOVERLAPPED lpOverlapped)
 Windows Completion Port function prototypes.
typedef BOOL(PASCAL * PACCEPTEX )(SOCKET sListenSocket, SOCKET sAcceptSocket, PVOID lpOutputBuffer, DWORD dwReceiveDataLength, DWORD dwLocalAddressLength, DWORD dwRemoteAddressLength, LPDWORD lpdwBytesReceived, LPOVERLAPPED lpOverlapped)
typedef BOOL(PASCAL * PDISCONNECTEX )(SOCKET hSocket, LPOVERLAPPED lpOverlapped, DWORD dwFlags, DWORD reserved)

Variables

static
BEGIN_TERIMBER_NAMESPACE
exception_item 
aiosockMsgs []
exception_table aiosockTable (aiosockMsgs)
const size_t aiosock_io_initiation_ident = 1
 initiation thread ident
const size_t aiosock_io_initiation_thread_alert = 1000
 initiation thread stay on alert time
const size_t aiosock_completion_io_port_ident = 2
 thread wait for completion Terimber Completion Port ident
const size_t aiosock_completion_io_port_thread_alert = INFINITE
 waits until closure
const size_t aiosock_working_ident = 3
 working thread ident
const size_t aiosock_working_thread_alert = 60000
 returns back to pool in 1 minute
const GUID GUID_MSWSOCK_ACCEPTEX = {0xb5367df1,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}
 GUID for retrieving function pointers from winsock library.
const GUID GUID_MSWSOCK_CONNECTEX = {0x25a207b9,0xddf3,0x4660,{0x8e,0xe9,0x76,0xe5,0x8c,0x74,0x06,0x3e}}
const GUID GUID_MSWSOCK_DISCONNECTEX = {0x7fda2e11,0x8630,0x436f,{0xa0, 0x31, 0xf5, 0x36, 0xa6, 0xee, 0xc1, 0x57}}


Define Documentation

#define SO_UPDATE_ACCEPT_CONTEXT   0x700B

Definition at line 216 of file aiosock.cpp.

Referenced by aiosock::v_do_job().

#define SO_UPDATE_CONNECT_CONTEXT   0x7010

Definition at line 220 of file aiosock.cpp.

Referenced by aiosock::v_do_job().


Typedef Documentation

typedef BOOL(PASCAL * PACCEPTEX)(SOCKET sListenSocket, SOCKET sAcceptSocket, PVOID lpOutputBuffer, DWORD dwReceiveDataLength, DWORD dwLocalAddressLength, DWORD dwRemoteAddressLength, LPDWORD lpdwBytesReceived, LPOVERLAPPED lpOverlapped)

Definition at line 196 of file aiosock.cpp.

typedef BOOL(PASCAL * PCONNECTEX)(SOCKET s, const struct sockaddr *name, int namelen, PVOID lpSendBuffer, DWORD dwSendDataLength, LPDWORD lpdwBytesSent, LPOVERLAPPED lpOverlapped)

Windows Completion Port function prototypes.

Definition at line 188 of file aiosock.cpp.

typedef BOOL(PASCAL * PDISCONNECTEX)(SOCKET hSocket, LPOVERLAPPED lpOverlapped, DWORD dwFlags, DWORD reserved)

Definition at line 205 of file aiosock.cpp.


Variable Documentation

thread wait for completion Terimber Completion Port ident

Definition at line 178 of file aiosock.cpp.

Referenced by aiosock::on(), aiosock::v_do_job(), and aiosock::v_has_job().

const size_t aiosock_completion_io_port_thread_alert = INFINITE

waits until closure

Definition at line 180 of file aiosock.cpp.

Referenced by aiosock::on().

const size_t aiosock_io_initiation_ident = 1

initiation thread ident

Definition at line 174 of file aiosock.cpp.

Referenced by aiosock::on(), aiosock::v_do_job(), and aiosock::v_has_job().

initiation thread stay on alert time

Definition at line 176 of file aiosock.cpp.

Referenced by aiosock::on().

const size_t aiosock_working_thread_alert = 60000

returns back to pool in 1 minute

Definition at line 184 of file aiosock.cpp.

Referenced by aiosock::_process_block(), aiosock::complete_block(), aiosock::on(), and aiosock::v_do_job().

BEGIN_TERIMBER_NAMESPACE exception_item aiosockMsgs[] [static]

Definition at line 80 of file aiosock.cpp.

const GUID GUID_MSWSOCK_ACCEPTEX = {0xb5367df1,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}}

GUID for retrieving function pointers from winsock library.

Definition at line 211 of file aiosock.cpp.

Referenced by aiosock::_process_accept().

const GUID GUID_MSWSOCK_CONNECTEX = {0x25a207b9,0xddf3,0x4660,{0x8e,0xe9,0x76,0xe5,0x8c,0x74,0x06,0x3e}}

Definition at line 212 of file aiosock.cpp.

Referenced by aiosock::_process_connect().

const GUID GUID_MSWSOCK_DISCONNECTEX = {0x7fda2e11,0x8630,0x436f,{0xa0, 0x31, 0xf5, 0x36, 0xa6, 0xee, 0xc1, 0x57}}

Definition at line 213 of file aiosock.cpp.



© Copyright Terimber 2003-.