#include <wxlsock.h>
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) |
| wxLuaCSocket * | Accept () |
| 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 &) | |
| wxLuaCSocket & | operator= (const wxLuaCSocket &) |
Protected Attributes | |
| socket_type | m_sock |
| sockaddr_in | m_sockaddress |
| SocketState | m_sockstate |
Private Member Functions | |
| DECLARE_ABSTRACT_CLASS (wxLuaCSocket) | |
Definition at line 122 of file wxlsock.h.
| wxLuaCSocket::wxLuaCSocket | ( | ) |
| wxLuaCSocket::wxLuaCSocket | ( | socket_type | socket, | |
| sockaddr_in | address | |||
| ) |
Definition at line 346 of file wxlsock.cpp.
References lua2wx(), wxLuaSocketBase::m_address, wxLuaSocketBase::m_port_number, and m_sockaddress.
| wxLuaCSocket::~wxLuaCSocket | ( | ) | [virtual] |
Definition at line 353 of file wxlsock.cpp.
References m_sock, m_sockstate, and SOCKET_CLOSED.
| wxLuaCSocket::wxLuaCSocket | ( | const wxLuaCSocket & | ) | [protected] |
| wxLuaCSocket * wxLuaCSocket::Accept | ( | ) |
Definition at line 409 of file wxlsock.cpp.
References wxLuaSocketBase::AddErrorMessage(), INVALID_SOCKET, m_sock, m_sockstate, SOCKET_LISTENING, and wxLuaCSocket().
Referenced by wxLuaDebuggerCServer::ThreadFunction().
| bool wxLuaCSocket::Close | ( | ) |
Definition at line 556 of file wxlsock.cpp.
References wxLuaSocketBase::AddErrorMessage(), m_sock, m_sockstate, SOCKET_CLOSED, and SOCKET_ERROR.
Referenced by wxLuaDebugTarget::Stop().
| bool wxLuaCSocket::Connect | ( | const wxString & | address, | |
| u_short | port | |||
| ) |
Definition at line 430 of file wxlsock.cpp.
References wxLuaSocketBase::AddErrorMessage(), INVALID_SOCKET, lua2wx(), wxLuaSocketBase::m_address, wxLuaSocketBase::m_port_number, m_sock, m_sockaddress, m_sockstate, SOCKET_CLOSED, SOCKET_CONNECTED, SOCKET_ERROR, and wx2lua().
Referenced by wxLuaDebuggerCServer::StopServer(), and wxLuaDebugTarget::ThreadFunction().
| wxLuaCSocket::DECLARE_ABSTRACT_CLASS | ( | wxLuaCSocket | ) | [private] |
| wxString wxLuaCSocket::GetAddress | ( | ) |
| wxString wxLuaCSocket::GetLastErrorMsg | ( | ) | const [virtual] |
| int wxLuaCSocket::GetPort | ( | ) |
| SocketState wxLuaCSocket::GetState | ( | ) | const |
| virtual bool wxLuaCSocket::IsConnected | ( | ) | [virtual] |
Implements wxLuaSocketBase.
| bool wxLuaCSocket::Listen | ( | u_short | port, | |
| int | backLog = 100 | |||
| ) |
Definition at line 367 of file wxlsock.cpp.
References wxLuaSocketBase::AddErrorMessage(), INVALID_SOCKET, wxLuaSocketBase::m_port_number, m_sock, m_sockaddress, m_sockstate, SOCKET_CLOSED, SOCKET_ERROR, and SOCKET_LISTENING.
Referenced by wxLuaDebuggerCServer::StartServer().
| 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(), m_sock, m_sockstate, SOCKET_ACCEPTED, SOCKET_CONNECTED, and SOCKET_ERROR.
| bool wxLuaCSocket::Shutdown | ( | int | how = 2 |
) |
Definition at line 546 of file wxlsock.cpp.
References m_sock, m_sockstate, and SOCKET_CLOSED.
Referenced by wxLuaDebugTarget::Stop(), and wxLuaDebuggerCServer::StopServer().
| int wxLuaCSocket::Write | ( | const char * | buffer, | |
| wxUint32 | length | |||
| ) | [virtual] |
Implements wxLuaSocketBase.
Definition at line 486 of file wxlsock.cpp.
References wxLuaSocketBase::AddErrorMessage(), m_sock, m_sockstate, SOCKET_ACCEPTED, SOCKET_CONNECTED, and SOCKET_ERROR.
socket_type wxLuaCSocket::m_sock [protected] |
Definition at line 188 of file wxlsock.h.
Referenced by Accept(), Close(), Connect(), Listen(), Read(), Shutdown(), Write(), and ~wxLuaCSocket().
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().
1.6.3