Public Member Functions

# wxDatagramSocket Class Reference
[Networking]

`#include <wx/socket.h>`

Inheritance diagram for wxDatagramSocket:
[legend]

## Detailed Description

Todo:
  docme

##

Library: wxNet
Category: Networking

## Public Member Functions
| wxDatagramSocket (const wxSockAddress &addr, wxSocketFlags flags=wxSOCKET_NONE)
| Constructor.
virtual | ~wxDatagramSocket ()
| Destructor.
wxDatagramSocket & | SendTo (const wxSockAddress &address, const void *buffer, wxUint32 nbytes)
| Write a buffer of nbytes bytes to the socket.

List of all members.

## Constructor & Destructor Documentation

wxDatagramSocket::wxDatagramSocket | ( | const wxSockAddress & | addr,
|  | wxSocketFlags | flags = `wxSOCKET_NONE` |
| ) |  |  |

Constructor.

Parameters:

  | addr | The socket address.
  | flags | Socket flags (See wxSocketBase::SetFlags()).

virtual wxDatagramSocket::~wxDatagramSocket | ( |  | ) | `[virtual]`

Destructor.

Please see wxSocketBase::Destroy().

## Member Function Documentation

wxDatagramSocket& wxDatagramSocket::SendTo | ( | const wxSockAddress & | address,
|  | const void * | buffer,
|  | wxUint32 | nbytes |
| ) |  |  |

Write a buffer of nbytes bytes to the socket.

Use wxSocketBase::LastCount() to verify the number of bytes actually wrote. Use wxSocketBase::Error() to determine if the operation succeeded.

Parameters:

  | address | The address of the destination peer for this data.
  | buffer | Buffer where read data is.
  | nbytes | Number of bytes.

Returns:
  Returns a reference to the current object.

See also:
  wxSocketBase::LastError(), wxSocketBase::SetFlags()

|  | [ top ]