/* Header file for CS461 Socket interface */

/* 
 * This file is incomplete.  Fill in whatever #includes or definitions
 * you need here.  You can use the Linux data structures if you want, or you
 * are free to define your own as long as they are compatible with the test
 * programs.
 */
//#include <sys/socket.h>
//#include <netinet/in.h>

/* The cs461_socket interface.  It is identical to Linux sockets. */
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 ssize_t cs461_read (int fd, void *buf, size_t count);
extern ssize_t cs461_write (int fd, const void *buf, size_t count);
extern int cs461_close (int fd);
