www.pudn.com > Echo_Receiver.zip > SockDlg.h
// SockDlg.h : header file
//
#if !defined(AFX_SOCKDLG_H__D605748A_E1E6_11D1_ADD3_00A02429D966__INCLUDED_)
#define AFX_SOCKDLG_H__D605748A_E1E6_11D1_ADD3_00A02429D966__INCLUDED_
#include "MySocket.h" // Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CSockDlg dialog
class CSockDlg : public CDialog
{
// Construction
public:
//This buffer will contain 500 samples of audio data
//data is in 8KHz, 8bit PCM audio format
byte audio[500];
int c;
int count;
CString m_Status;
void OnSend();
void OnReceive();
void OnClose();
void OnConnect();
void OnAccept();
CSockDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CSockDlg)
enum { IDD = IDD_SOCK_DIALOG };
CListBox m_ctlSent;
CListBox m_ctlRecvd;
CButton m_ctlConnect;
CString m_sMessage;
CString m_sName;
int m_iType;
int m_iPort;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSockDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CSockDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnRType();
afx_msg void OnBconnect();
afx_msg void OnBsend();
afx_msg void OnBclose();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
BOOL m_bConnected;
CMySocket m_sListenSocket;
CMySocket m_sConnectSocket;
int lenght;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SOCKDLG_H__D605748A_E1E6_11D1_ADD3_00A02429D966__INCLUDED_)