Julius 4.2
|
00001 00017 /* 00018 * Copyright (c) 1991-2011 Kawahara Lab., Kyoto University 00019 * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology 00020 * Copyright (c) 2005-2011 Julius project team, Nagoya Institute of Technology 00021 * All rights reserved 00022 */ 00023 00024 #ifndef __SENT_SPEECH_TCPIP__ 00025 #define __SENT_SPEECH_TCPIP__ 00026 00027 #include <errno.h> 00028 #if defined(_WIN32) && !defined(__CYGWIN32__) 00029 /* win32 */ 00030 #include <winsock2.h> 00032 #define WINSOCK 00033 #else 00034 /* unixen */ 00035 #include <netdb.h> 00036 #include <sys/socket.h> 00037 #include <netinet/in.h> 00038 #include <sys/un.h> 00039 #include <arpa/inet.h> 00040 #include <sys/file.h> 00041 #include <sys/types.h> 00042 #include <fcntl.h> 00043 #endif 00044 00046 #define ADINNET_PORT 5530 00047 00049 #define NETAUDIO_DEVNAME "localhost:0" 00050 00052 #define CONNECTION_RETRY_TIMES 5 /* retry times */ 00053 00054 #define CONNECTION_RETRY_INTERVAL 2 /* sec. */ 00055 00056 00057 #ifdef __cplusplus 00058 extern "C" { 00059 #endif 00060 00061 /* net/rdwt.c */ 00062 int rd(int fd, char *data, int *len, int maxlen); 00063 int wt(int fd, char *data, int len); 00064 /* net/server_client.c */ 00065 int ready_as_server(int port_num); 00066 int accept_from(int sd); 00067 int make_connection(char *hostname, int port_num); 00068 int make_connection_unix(char *address); 00069 int close_socket(int sd); 00070 void cleanup_socket(); 00071 00072 #ifdef __cplusplus 00073 } 00074 #endif 00075 00076 #endif /* __SENT_SPEECH_TCPIP__ */