91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 0.6M
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2021-06-05
  • 語言: 其他
  • 標簽: 其他??

資源簡介

TCP_Socket.zip

資源截圖

代碼片段和文件信息


/***************************************************************************************
****************************************************************************************

class?cSocket

Description:
A?universal?asynchronous?bidirectional?TCP?Winsock?Socket?class?for?client?and?server.
The?server?supports?up?to?62?connections?at?the?same?time.
This?class?may?run?within?one?single?thread.

All?functions?in?this?class?return?an?API?error?code?or?0?on?success.

Author:?
Elm?(www.netcult.ch/elmue)

****************************************************************************************
****************************************************************************************/

#include?“stdafx.h“
#include?“Socket.h“

/*
----------------------------------------------------------------------------------
Using?these?conventions?results?in?better?readable?code?and?less?coding?errors?!
----------------------------------------------------------------------------------

?????cName??for?generic?class?definitions
?????CName??for?MFC?????class?definitions
?????tName??for?type????definitions
?????eName??for?enum????definitions
?????kName??for?struct??definitions

????e_Name??for?enum?variables
????E_Name??for?enum?constant?values

????i_Name??for?instances?of?classes
????h_Name??for?handles

????M_Name??for?macros
????T_Name??for?Templates
????t_Name??for?TCHAR?or?LPTSTR

????s_Name??for?strings
???sa_Name??for?Ascii?strings
???sw_Name??for?Wide?(Unicode)?strings
???bs_Name??for?BSTR
????f_Name??for?function?pointers
????k_Name??for?contructs?(struct)

????b_Name??boolBOOL?1?Bit

???s8_Name????signed??8?Bit?(char)
??s16_Name????signed?16?Bit?(SHORT)
??s32_Name????signed?32?Bit?(LONG?int)
??s64_Name????signed?64?Bit?(LONGLONG)

???u8_Name??unsigned??8?Bit?(BYTE)
??u16_Name??unsigned?16?bit?(WORD?WCHAR)
??u32_Name??unsigned?32?Bit?(DWORD?UINT)
??u64_Name??unsigned?64?Bit?(ULONGLONG)

????d_Name??for?double

??----------------

????m_Name??for?member?variables?of?a?class?(e.g.?ms32_Name?for?int?member?variable)
????g_Name??for?global?(static)?variables???(e.g.?gu16_Name?for?global?WORD)
????p_Name??for?pointer?????????????????????(e.g.???ps_Name??*pointer?to?string)
???pp_Name??for?pointer?to?pointer??????????(e.g.??ppd_Name?**pointer?to?double)
*/


TCP::cSocket::cSocket()
{
mb_Initialized????=?FALSE;
mu32_WaitIndex????=?0;
ms8_ReadBuffer????=?0;
mu32_Tick64Lo?????=?0;
mu32_Tick64Hi?????=?0;
ms64_MaxIdleTime??=?0;
mu32_EventTimeout?=?0;
}

TCP::cSocket::~cSocket()
{
if?(mb_Initialized)?
{
Close();
WSACleanup();
}

if?(ms8_ReadBuffer)?delete?ms8_ReadBuffer;
}

//?protected
//?Load?ws2_32.dll?and?initialize?Windsock?2.0
DWORD?TCP::cSocket::Initialize()
{
if?(mb_Initialized)
return?0;

//?Winsock?version?2.0?is?available?on?ALL?Windows?operating?systems?
//?except?Windows?95?which?comes?with?Winsock?1.1
WSADATA?k_Data;
DWOR

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2009-07-27?19:08??TCP?Socket?1.5\
?????目錄???????????0??2009-07-27?19:08??TCP?Socket?1.5\Release\
?????文件???????40960??2009-08-26?00:37??TCP?Socket?1.5\Release\SocketDemo.exe
?????文件???????85374??2009-08-26?00:39??TCP?Socket?1.5\Documentation.chm
?????文件????????1101??2009-07-31?14:29??TCP?Socket?1.5\resource.h
?????文件???????42819??2009-09-15?20:09??TCP?Socket?1.5\Socket.cpp
?????文件????????6160??2009-09-15?20:08??TCP?Socket?1.5\Socket.h
?????文件????????2291??2009-07-31?14:29??TCP?Socket?1.5\SocketDemo.clw
?????文件????????1484??2009-03-05?11:08??TCP?Socket?1.5\SocketDemo.cpp
?????文件????????1226??2009-03-05?11:08??TCP?Socket?1.5\SocketDemo.h
?????文件????????5815??2009-07-31?14:29??TCP?Socket?1.5\SocketDemo.rc
?????文件???????27810??2009-08-16?18:27??TCP?Socket?1.5\SocketDemoDlg.cpp
?????文件????????3799??2009-08-26?00:34??TCP?Socket?1.5\SocketDemoDlg.h
?????文件????????4162??2009-08-14?20:10??TCP?Socket?1.5\SocketDemo_MBCS.dsp
?????文件?????????548??2009-03-05?11:08??TCP?Socket?1.5\SocketDemo_MBCS.dsw
?????文件????????4226??2009-08-09?12:26??TCP?Socket?1.5\SocketDemo_UNICODE.dsp
?????文件?????????551??2009-03-05?11:08??TCP?Socket?1.5\SocketDemo_UNICODE.dsw
?????文件?????????212??2009-03-05?11:08??TCP?Socket?1.5\StdAfx.cpp
?????文件?????????999??2009-02-09?20:02??TCP?Socket?1.5\StdAfx.h
?????文件??????503682??2000-10-25?11:20??TCP?Socket?1.5\WinSock?FAQ.chm
?????文件?????????576??2009-03-06?13:41??TCP?Socket?1.5\_CleanDirectory.cmd

評論

共有 條評論