author | Michael Krelin <hacker@klever.net> | 2011-04-27 14:18:48 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2011-04-27 14:18:48 (UTC) |
commit | c3b240e06bae3b663505e2b1c52eb67c34ddd3ea (patch) (unidiff) | |
tree | 06793f5d56a8129bfdaaee441fc34fbb361ddb13 /PropsNetwork.cpp | |
parent | d097b824b7fcad001c9581fb2e322bf3e3e5961d (diff) | |
download | pumpkin-c3b240e06bae3b663505e2b1c52eb67c34ddd3ea.zip pumpkin-c3b240e06bae3b663505e2b1c52eb67c34ddd3ea.tar.gz pumpkin-c3b240e06bae3b663505e2b1c52eb67c34ddd3ea.tar.bz2 |
network settings: bind to specific ip address
Signed-off-by: Michael Krelin <hacker@klever.net>
-rwxr-xr-x[-rw-r--r--] | PropsNetwork.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/PropsNetwork.cpp b/PropsNetwork.cpp index b5585d7..2dd5913 100644..100755 --- a/PropsNetwork.cpp +++ b/PropsNetwork.cpp | |||
@@ -2,68 +2,71 @@ | |||
2 | // | 2 | // |
3 | 3 | ||
4 | #include "stdafx.h" | 4 | #include "stdafx.h" |
5 | #include "PumpKIN.h" | 5 | #include "PumpKIN.h" |
6 | #include "PropsNetwork.h" | 6 | #include "PropsNetwork.h" |
7 | 7 | ||
8 | #ifdef _DEBUG | 8 | #ifdef _DEBUG |
9 | #define new DEBUG_NEW | 9 | #define new DEBUG_NEW |
10 | #undef THIS_FILE | 10 | #undef THIS_FILE |
11 | static char THIS_FILE[] = __FILE__; | 11 | static char THIS_FILE[] = __FILE__; |
12 | #endif | 12 | #endif |
13 | 13 | ||
14 | ///////////////////////////////////////////////////////////////////////////// | 14 | ///////////////////////////////////////////////////////////////////////////// |
15 | // CPropsNetwork property page | 15 | // CPropsNetwork property page |
16 | 16 | ||
17 | IMPLEMENT_DYNCREATE(CPropsNetwork, CPropertyPage) | 17 | IMPLEMENT_DYNCREATE(CPropsNetwork, CPropertyPage) |
18 | 18 | ||
19 | CPropsNetwork::CPropsNetwork() : CPropertyPage(CPropsNetwork::IDD) | 19 | CPropsNetwork::CPropsNetwork() : CPropertyPage(CPropsNetwork::IDD) |
20 | { | 20 | { |
21 | //{{AFX_DATA_INIT(CPropsNetwork) | 21 | //{{AFX_DATA_INIT(CPropsNetwork) |
22 | m_ListenPort = 0; | 22 | m_ListenPort = 0; |
23 | m_SpeakPort = 0; | 23 | m_SpeakPort = 0; |
24 | m_TimeOut = 0; | 24 | m_TimeOut = 0; |
25 | m_BlockSize = 0; | 25 | m_BlockSize = 0; |
26 | m_ListenAddress = _T(""); | ||
26 | //}}AFX_DATA_INIT | 27 | //}}AFX_DATA_INIT |
27 | } | 28 | } |
28 | 29 | ||
29 | CPropsNetwork::~CPropsNetwork() | 30 | CPropsNetwork::~CPropsNetwork() |
30 | { | 31 | { |
31 | } | 32 | } |
32 | 33 | ||
33 | void CPropsNetwork::DoDataExchange(CDataExchange* pDX) | 34 | void CPropsNetwork::DoDataExchange(CDataExchange* pDX) |
34 | { | 35 | { |
35 | CPropertyPage::DoDataExchange(pDX); | 36 | CPropertyPage::DoDataExchange(pDX); |
36 | //{{AFX_DATA_MAP(CPropsNetwork) | 37 | //{{AFX_DATA_MAP(CPropsNetwork) |
37 | DDX_Control(pDX, IDC_BSIZESPIN, m_BSizeSpinCtl); | 38 | DDX_Control(pDX, IDC_BSIZESPIN, m_BSizeSpinCtl); |
38 | DDX_Control(pDX, IDC_TIMESPIN, m_TimeSpinCtl); | 39 | DDX_Control(pDX, IDC_TIMESPIN, m_TimeSpinCtl); |
39 | DDX_Control(pDX, IDC_SPEAKSPIN, m_SpeakSpinCtl); | 40 | DDX_Control(pDX, IDC_SPEAKSPIN, m_SpeakSpinCtl); |
40 | DDX_Control(pDX, IDC_LISTENSPIN, m_ListenSpinCtl); | 41 | DDX_Control(pDX, IDC_LISTENSPIN, m_ListenSpinCtl); |
41 | DDX_Text(pDX, IDC_LISTENPORT, m_ListenPort); | 42 | DDX_Text(pDX, IDC_LISTENPORT, m_ListenPort); |
42 | DDX_Text(pDX, IDC_SPEAKPORT, m_SpeakPort); | 43 | DDX_Text(pDX, IDC_SPEAKPORT, m_SpeakPort); |
43 | DDX_Text(pDX, IDC_TIMEOUT, m_TimeOut); | 44 | DDX_Text(pDX, IDC_TIMEOUT, m_TimeOut); |
44 | DDV_MinMaxUInt(pDX, m_TimeOut, 5, 60); | 45 | DDV_MinMaxUInt(pDX, m_TimeOut, 5, 60); |
45 | DDX_Text(pDX, IDC_BLOCKSIZE, m_BlockSize); | 46 | DDX_Text(pDX, IDC_BLOCKSIZE, m_BlockSize); |
47 | DDX_Text(pDX, IDC_LISTENADDRESS, m_ListenAddress); | ||
48 | DDV_MaxChars(pDX, m_ListenAddress, 15); | ||
46 | //}}AFX_DATA_MAP | 49 | //}}AFX_DATA_MAP |
47 | } | 50 | } |
48 | 51 | ||
49 | 52 | ||
50 | BEGIN_MESSAGE_MAP(CPropsNetwork, CPropertyPage) | 53 | BEGIN_MESSAGE_MAP(CPropsNetwork, CPropertyPage) |
51 | //{{AFX_MSG_MAP(CPropsNetwork) | 54 | //{{AFX_MSG_MAP(CPropsNetwork) |
52 | //}}AFX_MSG_MAP | 55 | //}}AFX_MSG_MAP |
53 | END_MESSAGE_MAP() | 56 | END_MESSAGE_MAP() |
54 | 57 | ||
55 | ///////////////////////////////////////////////////////////////////////////// | 58 | ///////////////////////////////////////////////////////////////////////////// |
56 | // CPropsNetwork message handlers | 59 | // CPropsNetwork message handlers |
57 | 60 | ||
58 | BOOL CPropsNetwork::OnInitDialog() | 61 | BOOL CPropsNetwork::OnInitDialog() |
59 | { | 62 | { |
60 | CPropertyPage::OnInitDialog(); | 63 | CPropertyPage::OnInitDialog(); |
61 | 64 | ||
62 | m_ListenSpinCtl.SetRange(0,32767); | 65 | m_ListenSpinCtl.SetRange(0,32767); |
63 | m_SpeakSpinCtl.SetRange(0,32767); | 66 | m_SpeakSpinCtl.SetRange(0,32767); |
64 | m_TimeSpinCtl.SetRange(5,60); | 67 | m_TimeSpinCtl.SetRange(5,60); |
65 | m_BSizeSpinCtl.SetRange(512,16384); | 68 | m_BSizeSpinCtl.SetRange(512,16384); |
66 | UDACCEL uda = {0,512}; | 69 | UDACCEL uda = {0,512}; |
67 | m_BSizeSpinCtl.SetAccel(1,&uda); | 70 | m_BSizeSpinCtl.SetAccel(1,&uda); |
68 | 71 | ||
69 | return TRUE; // return TRUE unless you set the focus to a control | 72 | return TRUE; // return TRUE unless you set the focus to a control |