2014-09-16 17:21:38 -07:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2014 Brian Swetland
|
|
|
|
|
*
|
2019-07-05 17:22:23 -07:00
|
|
|
* Use of this source code is governed by a MIT-style
|
|
|
|
|
* license that can be found in the LICENSE file or at
|
|
|
|
|
* https://opensource.org/licenses/MIT
|
2014-09-16 17:21:38 -07:00
|
|
|
*/
|
|
|
|
|
#pragma once
|
2014-08-05 18:19:57 -07:00
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
#include <netinet/in.h>
|
|
|
|
|
#include <arpa/inet.h>
|
2014-09-16 17:21:38 -07:00
|
|
|
#include <netdb.h>
|
2014-08-05 18:19:57 -07:00
|
|
|
|
|
|
|
|
int udp_listen(in_addr_t addr, unsigned port, int shared);
|
|
|
|
|
int udp_connect(in_addr_t addr, unsigned port);
|
|
|
|
|
|
|
|
|
|
int tcp_listen(in_addr_t addr, unsigned port);
|
|
|
|
|
int tcp_connect(in_addr_t addr, unsigned port);
|
|
|
|
|
|
|
|
|
|
in_addr_t lookup_hostname(const char *hostname);
|