Results 1 to 4 of 4

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User edi's Avatar
    Join Date: Jan:2003
    Location: Sofia/Varna
    Posts: 546

    WinSocket VC++!

    windows - VypressChat. ... UDP broadcast 8167. send .. .. ...255 8167?
    :
    Code:
    void MySocket::OnReceive(int nErrorCode)
    {
    	CString Message, ipaddr = "0.0.0.0";
    	CReceiveDlg dlg;
    	unsigned portn=8168;
    	char Buffer[512];
    	CAsyncSocket::OnReceive(nErrorCode);
    
    	if (nErrorCode) 
    	{
    	Message.Format("OnReceive nErrorCode: %i", nErrorCode);
    	AfxMessageBox(Message);
    	return;
    	}
    	
    	dlg.m_msg1 = ReceiveFrom(Buffer, sizeof Buffer, ipaddr,portn);
    	dlg.m_msg2 = Buffer;
    	dlg.UpdateData(FALSE);
    
    }
    MySocket CAsyncSocket, CReceiveDlg 2 edit CString m_msg1;m_msg2; 8167 ...
    ..... ... buffer ? ...?

  2. #2
    ++ mitkomk's Avatar
    Join Date: May:2003
    Location: Plovdiv
    Posts: 805
    ~~~~ My the force be with you ~~~~
    DFI LP UT P45-T2RS, E8400 E0, Xigmatek S1284, Corsair TWIN2X4096-8500C5D 4x2GB, Sapphire HD 5870 1GB Vapor-X, CHIEFTEC 650W,HP LP2275W, CM CENTURION 534+

  3. #3
    Registered User
    Join Date: Aug:2003
    Location:
    Posts: 175
    ? : CAsyncSocket::Bind(). CAsyncSocket ( WinSocks ), UDP , . 0.0.0.0.

    Getting Started with Winsock - Winsock, .

    : OnReceive . ... .

  4. #4
    Registered User edi's Avatar
    Join Date: Jan:2003
    Location: Sofia/Varna
    Posts: 546
    ... ... ...
    " ... ." ... ... ... ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |