% Microsoft Developer Studio - QSEND - [MAINFRM.CPP]
[1) File Edit View insert Build Jools Window Help
i i-: * ci ±
r^i |qsend - Win32 Debug
zi 8 %
-Isl X|
tgj}| |VisualC++ BooksOnline 3 44 =tHl =15 ^£5 ^4 "lik
E) qsend classes
CM ainFrame O bject ID s CM ainFrame
w Messages
- .h
CAboutDlg
CChildFrame
CMainFrame
♦ AssertValid()
♦ CMainFrame()
^ ~CMainFrame()
$ Durnp()
♦I ListenTTI
OnCreate(]
OnListeningSocket(]
♦ PreCreateWindow(] m_wndStatusBar m_wndToolBar pListeningSocket
CQsendApp
CQsendCntrltem
CQsendDoc
CQsencMew
Q Socket
SelectHost
void CMainFrame::Listen()
Idelete pListeningSocket; pListeningSocket = new QSocket;
SOCKADDR_IN sock_address;
int addr_size = sizeof(sock_address);
sock_address.sin_f amily = AF_INET;
sock_address.sin_addr.s_addr = htonl(INADDR_ANY);
sock_address.sin_port = htons(QSEND_PORT);
pL i s t en i ngSocke t-> B i nd((SOCKADDR*)&sock_address, addr_s
pListeningSocket->SetReceiveTarget(this, WM_SOCKET_LISH
pListeningSocket->Listen();
LRESULT CMainFrame::OnListeningSocket(WPARAM amount, LPARAM—I {
if ((int)amount > 0)
{
>
else
{
// if amount < 0 it is a receive command świtoh ( (SocketReceiveCmd)amount )
►
J±U
-Li | ||
f\ Build / Debug \ Find in Files \ Profile / |
liU iT | |
Ready |
Ln129,Col5 COL | |
Start |
^Microsoft Developer ... ^MicrosoftWord-WORKD... |
10:34 PM |