Mercurial > hg > audiostuff
comparison intercom/udp.h @ 2:13be24d74cd2
import intercom-0.4.1
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 09:57:52 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1:9cadc470e3da | 2:13be24d74cd2 |
---|---|
1 /* udp.h | |
2 * | |
3 * Copyright (C) DFS Deutsche Flugsicherung (2004, 2005). | |
4 * All Rights Reserved. | |
5 * | |
6 * UDP functions for IPv4 | |
7 * | |
8 * Version 0.2 | |
9 */ | |
10 | |
11 class UDP { | |
12 int local_fd; | |
13 struct sockaddr_in foreign_sock; | |
14 public: | |
15 void send_init(char *foreign_name, int foreign_port, int local_fd_); | |
16 void send(char *buf, int bytes); | |
17 void send_close(); | |
18 }; | |
19 | |
20 int UDP_recv_init(int port); | |
21 | |
22 // IP to ASCII | |
23 char *iptoa(char *buf, in_addr_t ip); | |
24 | |
25 // ASCII to IP | |
26 in_addr_t atoip(char *buf); |