Mercurial > hg > audiostuff
view intercom/udp.h @ 6:22a74b01a099 default tip
implement more meaningful test program
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 16:14:50 +0200 |
parents | 13be24d74cd2 |
children |
line wrap: on
line source
/* udp.h * * Copyright (C) DFS Deutsche Flugsicherung (2004, 2005). * All Rights Reserved. * * UDP functions for IPv4 * * Version 0.2 */ class UDP { int local_fd; struct sockaddr_in foreign_sock; public: void send_init(char *foreign_name, int foreign_port, int local_fd_); void send(char *buf, int bytes); void send_close(); }; int UDP_recv_init(int port); // IP to ASCII char *iptoa(char *buf, in_addr_t ip); // ASCII to IP in_addr_t atoip(char *buf);