19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 #ifndef NET_UTILS_MD_H
27 #define NET_UTILS_MD_H
28
29 #include <sys/socket.h>
30 #include <sys/types.h>
31 #include <netdb.h>
32 #include <netinet/in.h>
33 #include <unistd.h>
34
35 #ifndef USE_SELECT
36 #include <sys/poll.h>
37 #endif
38
39 int NET_Timeout(int s, long timeout);
40 int NET_Read(int s, void* buf, size_t len);
41 int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
42 struct sockaddr *from, socklen_t *fromlen);
43 int NET_ReadV(int s, const struct iovec * vector, int count);
44 int NET_Send(int s, void *msg, int len, unsigned int flags);
45 int NET_SendTo(int s, const void *msg, int len, unsigned int
46 flags, const struct sockaddr *to, int tolen);
47 int NET_Writev(int s, const struct iovec * vector, int count);
48 int NET_Connect(int s, struct sockaddr *addr, int addrlen);
49 int NET_Accept(int s, struct sockaddr *addr, socklen_t *addrlen);
50 int NET_SocketClose(int s);
51 int NET_Dup2(int oldfd, int newfd);
52 #ifdef USE_SELECT
53 extern int NET_Select(int s, fd_set *readfds, fd_set *writefds,
54 fd_set *exceptfds, struct timeval *timeout);
55 #else
56 extern int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout);
57 #endif
58
59 int NET_SocketAvailable(int s, jint *pbytes);
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 #ifndef NET_UTILS_MD_H
27 #define NET_UTILS_MD_H
28
29 #include <sys/socket.h>
30 #include <sys/types.h>
31 #include <netdb.h>
32 #include <netinet/in.h>
33 #include <unistd.h>
34
35 #ifndef USE_SELECT
36 #include <sys/poll.h>
37 #endif
38
39 int NET_Timeout(JNIEnv *env, int s, long timeout);
40 int NET_Read(int s, void* buf, size_t len);
41 int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
42 struct sockaddr *from, socklen_t *fromlen);
43 int NET_ReadV(int s, const struct iovec * vector, int count);
44 int NET_Send(int s, void *msg, int len, unsigned int flags);
45 int NET_SendTo(int s, const void *msg, int len, unsigned int
46 flags, const struct sockaddr *to, int tolen);
47 int NET_Writev(int s, const struct iovec * vector, int count);
48 int NET_Connect(int s, struct sockaddr *addr, int addrlen);
49 int NET_Accept(int s, struct sockaddr *addr, socklen_t *addrlen);
50 int NET_SocketClose(int s);
51 int NET_Dup2(int oldfd, int newfd);
52 #ifdef USE_SELECT
53 extern int NET_Select(int s, fd_set *readfds, fd_set *writefds,
54 fd_set *exceptfds, struct timeval *timeout);
55 #else
56 extern int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout);
57 #endif
58
59 int NET_SocketAvailable(int s, jint *pbytes);
|