Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <vsnet_sockethttp.h>
Public Member Functions | |
VsnetHTTPSocket (const AddressIP &remote_ip, const std::string &host, const std::string &path, SocketSet &set) | |
VsnetHTTPSocket (const std::string &url, SocketSet &set) | |
virtual bool | lower_selected (int datalen=-1) |
virtual int | lower_sendbuf () |
virtual void | lower_clean_sendbuf () |
bool | sendstr (const std::string &data) |
bool | recvstr (std::string &data) |
virtual bool | need_test_writable () |
virtual bool | write_on_negative () |
virtual int | optPayloadSize () const |
virtual bool | isActive () |
void | resendData () |
void | reopenConnection () |
virtual bool | isReadyToSend (fd_set *) |
virtual void | dump (std::ostream &ostr) const |
![]() | |
VsnetSocketBase (int fd, const char *socktype, SocketSet &set) | |
virtual | ~VsnetSocketBase () |
bool | valid () const |
int | get_fd () const |
int | close_fd () |
const char * | get_socktype () const |
bool | set_block () |
bool | set_nonblock () |
bool | get_nonblock () const |
void | disconnect (const char *s) |
virtual int | get_write_fd () const |
void | setSet (SocketSet *set) |
Friends | |
std::ostream & | operator<< (std::ostream &ostr, const VsnetHTTPSocket &s) |
Additional Inherited Members | |
![]() | |
virtual void | child_disconnect (const char *s) |
![]() | |
int | _fd |
SocketSet * | _set |
Definition at line 18 of file vsnet_sockethttp.h.
VsnetHTTPSocket::VsnetHTTPSocket | ( | const AddressIP & | remote_ip, |
const std::string & | host, | ||
const std::string & | path, | ||
SocketSet & | set | ||
) |
Definition at line 11 of file vsnet_sockethttp.cpp.
VsnetHTTPSocket::VsnetHTTPSocket | ( | const std::string & | url, |
SocketSet & | set | ||
) |
Definition at line 97 of file vsnet_sockethttp.cpp.
References hostFromURI(), and remoteIPFromURI().
|
virtual |
Definition at line 139 of file vsnet_sockethttp.cpp.
Referenced by operator<<().
|
virtual |
Implements VsnetSocketBase.
Definition at line 92 of file vsnet_sockethttp.cpp.
|
virtual |
Reimplemented from VsnetSocketBase.
Definition at line 133 of file vsnet_sockethttp.cpp.
References VsnetSocketBase::get_write_fd(), and need_test_writable().
|
virtual |
Called when we noticed that the primary file descriptor is closed but data remains in the send queue.
Reimplemented from VsnetSocketBase.
Definition at line 171 of file vsnet_sockethttp.cpp.
References VsnetSocketBase::_fd, and reopenConnection().
Implements VsnetSocketBase.
Definition at line 330 of file vsnet_sockethttp.cpp.
References VsnetSocketBase::_fd, VsnetSocketBase::close_fd(), COUT, VsnetSocketBase::get_fd(), hostFromURI(), ishex(), VsnetOSS::recv(), remoteIPFromURI(), resendData(), and vsnetEWouldBlock().
|
virtual |
Reimplemented from VsnetSocketBase.
Definition at line 177 of file vsnet_sockethttp.cpp.
References VsnetSocketBase::_fd, VsnetSocketBase::close_fd(), COUT, NONBLOCKING_CONNECT, reopenConnection(), and vsnetEWouldBlock().
|
virtual |
Reimplemented from VsnetSocketBase.
Definition at line 35 of file vsnet_sockethttp.cpp.
References VsnetSocketBase::_fd, and queryTime().
Referenced by isReadyToSend(), and write_on_negative().
|
inlinevirtual |
Definition at line 54 of file vsnet_sockethttp.h.
bool VsnetHTTPSocket::recvstr | ( | std::string & | data) |
Definition at line 151 of file vsnet_sockethttp.cpp.
void VsnetHTTPSocket::reopenConnection | ( | ) |
Definition at line 117 of file vsnet_sockethttp.cpp.
References VsnetSocketBase::_fd, VsnetSocketBase::close_fd(), NetUIBase::createClientSocket(), int, and queryTime().
Referenced by lower_clean_sendbuf(), and lower_sendbuf().
void VsnetHTTPSocket::resendData | ( | ) |
Definition at line 303 of file vsnet_sockethttp.cpp.
References VsnetSocketBase::_fd, VsnetSocketBase::close_fd(), int, and queryTime().
Referenced by lower_selected().
bool VsnetHTTPSocket::sendstr | ( | const std::string & | data) |
Definition at line 145 of file vsnet_sockethttp.cpp.
Referenced by AcctLogout(), NetClient::loginAcctLoop(), NetServer::saveAccount(), and NetServer::sendJump().
|
virtual |
Reimplemented from VsnetSocketBase.
Definition at line 31 of file vsnet_sockethttp.cpp.
References need_test_writable().
|
friend |
Definition at line 166 of file vsnet_sockethttp.cpp.