You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
448 B
23 lines
448 B
#ifndef __SOCKET_H__
|
|
#define __SOCKET_H__
|
|
|
|
#include <arpa/inet.h> /* for in_port_t */
|
|
|
|
#include "class.h"
|
|
#include "logger.h"
|
|
|
|
CLASS(Sock) {
|
|
Logger log;
|
|
in_port_t port;
|
|
struct sockaddr_in addr;
|
|
int handle;
|
|
};
|
|
|
|
void socketConnect(Sock this, const char * addr);
|
|
void socketListen(Sock this, int backlog);
|
|
Sock socketAccept(Sock this, char (*remoteAddr)[16]);
|
|
|
|
#endif // __SOCKET_H__
|
|
|
|
// vim: set ts=4 sw=4:
|
|
|