File: server.h

package info (click to toggle)
cmus 2.4.3-2%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,516 kB
  • sloc: ansic: 29,728; sh: 1,236; makefile: 194; python: 159
file content (24 lines) | stat: -rw-r--r-- 375 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* 
 * Copyright Timo Hirvonen
 */

#ifndef _SERVER_H
#define _SERVER_H

#include "list.h"

struct client {
	struct list_head node;
	int fd;
	unsigned int authenticated : 1;
};

extern int server_socket;
extern struct list_head client_head;

void server_init(char *address);
void server_exit(void);
void server_accept(void);
void server_serve(struct client *client);

#endif