# wxSocketEvent Class Reference
[Networking]

`#include </home/work/projects/wx/2.9/wx/interface/wx/socket.h>`

Inheritance diagram for wxSocketEvent:
[legend]

## Detailed Description

This event class contains information about socket events.

This kind of events are sent to the event handler specified with wxSocketBase::SetEventHandler.

## Events using this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxSocketEvent& event)

Event macros:

- EVT_SOCKET(id, func):
  Process a socket event, supplying the member function.

##

Library: wxNet
Category: Networking

See also:
  wxSocketBase, wxSocketClient, wxSocketServer

## Public Member Functions

| wxSocketEvent (int id=0)
| Constructor.
void * | GetClientData () const
| Gets the client data of the socket which generated this event, as set with wxSocketBase::SetClientData().
wxSocketBase * | GetSocket () const
| Returns the socket object to which this event refers to.
wxSocketNotify | GetSocketEvent () const
| Returns the socket event type.

List of all members.

## Constructor & Destructor Documentation

wxSocketEvent::wxSocketEvent | ( | int | id = `0` | ) |

Constructor.

## Member Function Documentation

void* wxSocketEvent::GetClientData | ( |  | ) | const

Gets the client data of the socket which generated this event, as set with wxSocketBase::SetClientData().

wxSocketBase* wxSocketEvent::GetSocket | ( |  | ) | const

Returns the socket object to which this event refers to.

This makes it possible to use the same event handler for different sockets.

wxSocketNotify wxSocketEvent::GetSocketEvent | ( |  | ) | const

Returns the socket event type.

|  | [ top ]