#include <MNTCPSocket.h>
Inheritance diagram for MNTCPSocket:
Public Types | |
enum | CreationMode { MakeNow } |
enum | Fail { Ok = 0, Errno = -1, Herrno = -2 } |
Public Member Functions | |
MNTCPSocket () | |
MNTCPSocket (int i) | |
MNTCPSocket (int i, CreationMode mode) | |
virtual | ~MNTCPSocket () |
void | warn_errors (int errval) |
virtual void | callback (MNSelector *select, int fd)=0 |
virtual void | tcallback () |
virtual bool | isUdp () const |
virtual Fail | connect (int port, const char *hostname) |
virtual Fail | connect (const struct sockaddr_in &dest) |
int | read (char *buffer, int len) |
int | write (const char *buf, int len) |
bool | getLocalSockAddr (struct sockaddr_in &addr) |
bool | getRemoteSockAddr (struct sockaddr_in &addr) |
Protected Member Functions | |
void | show_buffers (struct iovec *iov) |
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from MNSocketBase.
Implemented in MNTCPServerSocket, MNTCPClientSocket, RTPServerSocket, and RTSPFillBuffer.
|
|
Calls transparently the ::connect function. It has been virtualized to provide subclasses the possibility for post-processing, e.g. changing the socket to non-blocking after a successful connect. |
|
Calls transparently the ::connect function. It has been virtualized to provide subclasses the possibility for post-processing, e.g. changing the socket to non-blocking after a successful connect. Reimplemented in RTSPFillBuffer.
|
|
A host with multiple interfaces and INADDR_ANY in the sockaddr_in structure during connect will choose the most appropriate IP address to connect to that host. It is very likely that this address is also the best address to send to the server for connection establishment in the opposite direction. Therefore, this functions makes it possible to ask for this address. It is only valid when the socket is connected.
|
|
It may be interesting to connect to the same remote interface. If this socket is already connected, you can use this function to get the appropriate structure filled.
|
|
Simple function returning false. It is used to figure out what kind of socket is used. This is a TCP class so the function returns false.
Implements MNSocket.
|
|
The read call is mapped to the operating system call recv(). The output of recv() is not modified. If the return value is negative, errno holds the details. |
|
|
|
|
|
|
|
|