//---------------------------------------------------------------------------- // Laser Guard Ltd. // Copyright © 2000-2002. All Rights Reserved. // Version 1.0 01/01/2000 // Last modification: 08/10/2003 // PROJECT: // SUBSYSTEM: // FILE: LgSocketClient.cpp // AUTHOR: Sergey Chizhevskiy // OVERVIEW // ~~~~~~~~ // Source file of LgSocketClient.cpp //---------------------------------------------------------------------------- #include "stdafx.h" #include "LgSocketClient.h" /* template CLgSocketClient::CLgSocketClient() { } template CLgSocketClient::~CLgSocketClient() { Destroy(); } // Do not edit the following lines, which are needed by ClassWizard. #if 0 BEGIN_MESSAGE_MAP(CLgSocketClient, BASE_SOCKET) //{{AFX_MSG_MAP(CLgSocketClient) //}}AFX_MSG_MAP END_MESSAGE_MAP() #endif // 0 template BOOL CLgSocketClient::Create( LPCTSTR lpszHostAddress, UINT nHostPort ) { // create socket if( !BASE_SOCKET::Create() ) return FALSE; // establish connection with server if( !BASE_SOCKET::Connect( lpszHostAddress, nHostPort ) ) { DWORD dwError = GetLastError(); switch( dwError ) { case WSAEWOULDBLOCK: break; default: return FALSE; } } return TRUE; } template void CLgSocketClient::Destroy() { // close socket Close(); } */