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 <unistd.h>
#include "private.h"
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "lib.h"
#include "mutt_globals.h"
#include "options.h"
#include <stdbool.h>
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. More... | |
int | raw_socket_open (struct Connection *conn) |
Open a socket - Implements Connection::open() -. More... | |
int | raw_socket_read (struct Connection *conn, char *buf, size_t count) |
Read data from a socket - Implements Connection::read() -. More... | |
int | raw_socket_write (struct Connection *conn, const char *buf, size_t count) |
Write data to a socket - Implements Connection::write() -. More... | |
int | raw_socket_poll (struct Connection *conn, time_t wait_secs) |
Checks whether reads would block - Implements Connection::poll() -. More... | |
int | raw_socket_close (struct Connection *conn) |
Close a socket - Implements Connection::close() -. More... | |
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 67 of file raw.c.