#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#ifndef _WIN32
#include <unistd.h>
#endif
#include "s_net.h"
t_fdpoll;
static int nfdpoll;
static t_fdpoll *fdpoll;
static int maxfd;
static int sockfd;
static int protocol;
char recvbuf[NET_MAXPACKETSIZE];
static void sockerror(char *s);
static void dopoll(void);
static void sockerror(char *s);
int main(int argc, char **argv)
{ … }
static void addport(int fd)
{ … }
static void rmport(t_fdpoll *x)
{ … }
static void doconnect(void)
{ … }
static void makeoutput(char *buf, int len)
{ … }
static void udpread(void)
{ … }
static int tcpmakeoutput(t_fdpoll *x, char *inbuf, int len)
{ … }
static void tcpread(t_fdpoll *x)
{ … }
static void dopoll(void)
{ … }
void sockerror(char *s)
{ … }