/*
 * CS461 socket interface.  It is the Linux socket interface 
 * with "cs461_" prepended to each function name. 
 */

#include <sys/socket.h>
#include <netinet/in.h>

/* For Assignment 3 */
extern int cs461_socket (int domain, int type, int protocol);
extern int cs461_connect (int sockfd, struct sockaddr *serv_addr, 
                          socklen_t addrlen);
extern int cs461_bind (int sockfd, struct sockaddr *my_addr, 
                       socklen_t addrlen);
extern int cs461_listen (int s, int backlog);
extern int cs461_accept (int s, struct sockaddr *addr, socklen_t *addrlen);
extern int cs461_close (int fd);
extern int cs461_shutdown ();      // always called before program exits

/* For Assignment 4 */
extern ssize_t cs461_read (int fd, void *buf, size_t count);
extern ssize_t cs461_write (int fd, const void *buf, size_t count);
