Low-level socket handling. More...
#include "config.h"#include <errno.h>#include <fcntl.h>#include <netdb.h>#include <netinet/in.h>#include <signal.h>#include <stdint.h>#include <stdio.h>#include <string.h>#include <sys/select.h>#include <sys/socket.h>#include <sys/time.h>#include <time.h>#include <unistd.h>#include "private.h"#include "mutt/lib.h"#include "config/lib.h"#include "core/lib.h"#include "gui/lib.h"#include "connaccount.h"#include "connection.h"#include "globals.h"#include "address/lib.h"#include <stdbool.h>
Include dependency graph for raw.c:Go to the source code of this file.
Functions | |
| static int | socket_connect (int fd, struct sockaddr *sa) |
| Set up to connect to a socket fd. | |
| int | raw_socket_open (struct Connection *conn) |
| Open a socket - Implements Connection::open() -. | |
| int | raw_socket_read (struct Connection *conn, char *buf, size_t count) |
| Read data from a socket - Implements Connection::read() -. | |
| int | raw_socket_write (struct Connection *conn, const char *buf, size_t count) |
| Write data to a socket - Implements Connection::write() -. | |
| int | raw_socket_poll (struct Connection *conn, time_t wait_secs) |
| Check if any data is waiting on a socket - Implements Connection::poll() -. | |
| int | raw_socket_close (struct Connection *conn) |
| Close a socket - Implements Connection::close() -. | |
Low-level socket handling.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file raw.c.
|
static |
Set up to connect to a socket fd.
| fd | File descriptor to connect with |
| sa | Address info |
| 0 | Success |
| >0 | An errno, e.g. EPERM |
| -1 | Error |
Definition at line 68 of file raw.c.
Here is the call graph for this function:
Here is the caller graph for this function: