CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002
    Posts
    372

    sockets question

    hello,

    using a udp socket, is it ok and legal to do some thing like this :

    pSocket->SendTo( "http://www.mydomain.com" ), and to receive the
    message on a server ?

    thanks

  2. #2
    Join Date
    Jun 2003
    Location
    Bucharest, Romania
    Posts
    529

    Re: sockets question

    no, I guess it's not.. u must supply a SOCKADDR structure as described in MSDN..
    Code:
    //MSDN
    Call this member function to send data to a specific destination.
    
    int SendTo(
       const void* lpBuf,
       int nBufLen,
       UINT nHostPort,
       LPCTSTR lpszHostAddress = NULL,
       int nFlags = 0 
    );
    int SendTo(
       const void* lpBuf,
       int nBufLen,
       const SOCKADDR* lpSockAddr,
       int nSockAddrLen,
       int nFlags = 0 
    );
    Last edited by chi_luci; November 12th, 2004 at 03:18 AM.

  3. #3
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652

    Re: sockets question

    [ Moved thread ]

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured