Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

wxLuaCSocket Class Reference

#include <wxlsock.h>

Inheritance diagram for wxLuaCSocket:

[legend]
Collaboration diagram for wxLuaCSocket:
[legend]
List of all members.

Public Types

enum  SocketState { SOCKET_CLOSED, SOCKET_LISTENING, SOCKET_ACCEPTED, SOCKET_CONNECTED }

Public Member Functions

 wxLuaCSocket ()
 wxLuaCSocket (socket_type socket, sockaddr_in address)
virtual ~wxLuaCSocket ()
bool Listen (u_short port, int backLog=100)
wxLuaCSocketAccept ()
bool Connect (const wxString &address, u_short port)
SocketState GetState () const
int GetSocket () const
wxString GetAddress ()
int GetPort ()
bool Shutdown (int how=2)
bool Close ()
virtual bool IsConnected ()
virtual int Read (char *buffer, wxUint32 length)
virtual int Write (const char *buffer, wxUint32 length)
virtual wxString GetLastErrorMsg () const

Protected Member Functions

 wxLuaCSocket (const wxLuaCSocket &)
wxLuaCSocketoperator= (const wxLuaCSocket &)

Protected Attributes

socket_type m_sock
sockaddr_in m_sockaddress
SocketState m_sockstate

Private Member Functions

 DECLARE_ABSTRACT_CLASS (wxLuaCSocket)

Member Enumeration Documentation

enum wxLuaCSocket::SocketState
 

Enumeration values:
SOCKET_CLOSED 
SOCKET_LISTENING 
SOCKET_ACCEPTED 
SOCKET_CONNECTED 

Definition at line 126 of file wxlsock.h.


Constructor & Destructor Documentation

wxLuaCSocket::wxLuaCSocket  ) 
 

Definition at line 341 of file wxlsock.cpp.

References m_sockaddress.

Referenced by Accept().

wxLuaCSocket::wxLuaCSocket socket_type  socket,
sockaddr_in  address
 

Definition at line 346 of file wxlsock.cpp.

References lua2wx(), and m_sockaddress.

wxLuaCSocket::~wxLuaCSocket  )  [virtual]
 

Definition at line 353 of file wxlsock.cpp.

References m_sockstate.

wxLuaCSocket::wxLuaCSocket const wxLuaCSocket  )  [protected]
 


Member Function Documentation

wxLuaCSocket * wxLuaCSocket::Accept  ) 
 

Definition at line 409 of file wxlsock.cpp.

References wxLuaSocketBase::AddErrorMessage(), m_sockstate, socket_type, and wxLuaCSocket().

bool wxLuaCSocket::Close  ) 
 

Definition at line 556 of file wxlsock.cpp.

References wxLuaSocketBase::AddErrorMessage(), and m_sockstate.

Referenced by wxLuaDebugTarget::Stop().

bool wxLuaCSocket::Connect const wxString &  address,
u_short  port
 

Definition at line 430 of file wxlsock.cpp.

References wxLuaSocketBase::AddErrorMessage(), lua2wx(), m_sock, m_sockaddress, m_sockstate, and wx2lua().

Referenced by wxLuaDebugTarget::ThreadFunction().

wxLuaCSocket::DECLARE_ABSTRACT_CLASS wxLuaCSocket   )  [private]
 

wxString wxLuaCSocket::GetAddress  ) 
 

wxString wxLuaCSocket::GetLastErrorMsg  )  const [virtual]
 

Implements wxLuaSocketBase.

Definition at line 583 of file wxlsock.cpp.

References lua2wx().

int wxLuaCSocket::GetPort  ) 
 

int wxLuaCSocket::GetSocket  )  const
 

Definition at line 152 of file wxlsock.h.

SocketState wxLuaCSocket::GetState  )  const
 

Definition at line 150 of file wxlsock.h.

virtual bool wxLuaCSocket::IsConnected  )  [virtual]
 

Implements wxLuaSocketBase.

Definition at line 166 of file wxlsock.h.

bool wxLuaCSocket::Listen u_short  port,
int  backLog = 100
 

Definition at line 367 of file wxlsock.cpp.

References wxLuaSocketBase::AddErrorMessage(), m_sock, m_sockaddress, and m_sockstate.

wxLuaCSocket& wxLuaCSocket::operator= const wxLuaCSocket  )  [protected]
 

int wxLuaCSocket::Read char *  buffer,
wxUint32  length
[virtual]
 

Implements wxLuaSocketBase.

Definition at line 515 of file wxlsock.cpp.

References wxLuaSocketBase::AddErrorMessage(), and m_sockstate.

Referenced by wxLuawxSocket::Read().

bool wxLuaCSocket::Shutdown int  how = 2  ) 
 

Definition at line 546 of file wxlsock.cpp.

References m_sock, and m_sockstate.

Referenced by wxLuaDebugTarget::Stop().

int wxLuaCSocket::Write const char *  buffer,
wxUint32  length
[virtual]
 

Implements wxLuaSocketBase.

Definition at line 486 of file wxlsock.cpp.

References wxLuaSocketBase::AddErrorMessage(), and m_sockstate.

Referenced by wxLuawxSocket::Write().


Member Data Documentation

socket_type wxLuaCSocket::m_sock [protected]
 

Definition at line 188 of file wxlsock.h.

Referenced by Connect(), Listen(), and Shutdown().

sockaddr_in wxLuaCSocket::m_sockaddress [protected]
 

Definition at line 189 of file wxlsock.h.

Referenced by Connect(), Listen(), and wxLuaCSocket().

SocketState wxLuaCSocket::m_sockstate [protected]
 

Definition at line 190 of file wxlsock.h.

Referenced by Accept(), Close(), Connect(), Listen(), Read(), Shutdown(), Write(), and ~wxLuaCSocket().


The documentation for this class was generated from the following files:
Generated on Sat Mar 1 22:42:23 2008 for wxLua by  doxygen 1.3.9.1