File: collection.h

package info (click to toggle)
sslh 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,960 kB
  • sloc: ansic: 7,681; perl: 683; sh: 356; makefile: 136
file content (18 lines) | stat: -rw-r--r-- 580 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef COLLECTION_H
#define COLLECTION_H

typedef struct cnx_collection cnx_collection;


cnx_collection* collection_init(int len);
void collection_destroy(cnx_collection* collection);

struct connection* collection_alloc_cnx_from_fd(cnx_collection* collection, int fd);
int collection_add_fd(cnx_collection* collection, struct connection* cnx, int fd);

/* Remove a connection from the collection */
int collection_remove_cnx(cnx_collection* collection, struct connection *cnx);

struct connection* collection_get_cnx_from_fd(struct cnx_collection* collection, int fd);

#endif