ашифрованому тексті
}
Клієнт
# include "stdafx.h"
# include "llip_client.h"
# include "MainFrm.h"
# include "llip_clientDoc.h"
# include "llip_clientView.h"
# include "PropDlg.h"
# ifdef _DEBUG
# define new DEBUG_NEW
# undef THIS_FILEchar THIS_FILE [] = __ FILE__;
# endif_MESSAGE_MAP (CLlip_clientApp, CWinApp)
// {{AFX_MSG_MAP (CLlip_clientApp) _COMMAND (ID_APP_ABOUT, OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}} AFX_MSG_MAP
// Standard file based document commands_COMMAND (ID_FILE_NEW, CWinApp :: OnFileNew) _COMMAND (ID_FILE_OPEN, CWinApp :: OnFileOpen) _MESSAGE_MAP () _clientApp :: CLlip_clientApp ()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
} _clientApp theApp; CLlip_clientApp :: InitInstance ()
{short port;// порт сервераlong addr;// адреса сервераd (NULL); (d.DoModal () == IDOK) {= d.m_port; (m_pwd, d.m_pwd.operator LPCTSTR (), 20); = * ((unsigned long *) d.m_addr);
} false; (! AfxSocketInit ())
{(IDP_SOCKETS_INIT_FAILED); FALSE;
}
# ifdef _AFXDLLdControls () ;//Call this when using MFC in a shared DLL
# elsedControlsStatic () ;//Call this when linking to MFC statically
# endif (_T ("Local AppWizard-Generated Applications")); (0);// Load standard INI file options (including MRU) * pDocTemplate; = new CSingleDocTemplate (_MAINFRAME, _CLASS ( CLlip_clientDoc), _CLASS (CMainFrame),// ​​main SDI frame window_CLASS (CLlip_clientView)); (pDocTemplate);
// Parse command line for standard shell commands, DDE, file opencmdInfo; (cmdInfo);
// Dispatch commands specified on the command line (! ProcessShellCommand (cmdInfo)) FALSE;
// The one and only window has been initialized, so show and update = R.left + 500;. Bottom = r.top + 380; _pMainWnd-> MoveWindow (& r);
sockaddr_in sa ;//структура даних гнізда
s = socket (AF_INET, SOCK_STREAM, 0) ;//створити гніздо (s == INVALID_SOCKET)
{(NULL, "Socket error.", "Помилка", MB_OK); 0;
} (addr == INADDR_NONE)// при помилку
{(NULL, "Invalid IP address.", "Помилка", MB_OK); (s);...