< prev index next >

src/java.base/unix/native/libnet/net_util_md.h

Print this page




  18  * 2 along with this work; if not, write to the Free Software Foundation,
  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 #include <sys/poll.h>
  36 
  37 int NET_Timeout(int s, long timeout);

  38 int NET_Read(int s, void* buf, size_t len);



  39 int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
  40                  struct sockaddr *from, socklen_t *fromlen);
  41 int NET_ReadV(int s, const struct iovec * vector, int count);
  42 int NET_Send(int s, void *msg, int len, unsigned int flags);
  43 int NET_SendTo(int s, const void *msg, int len,  unsigned  int
  44                flags, const struct sockaddr *to, int tolen);
  45 int NET_Writev(int s, const struct iovec * vector, int count);
  46 int NET_Connect(int s, struct sockaddr *addr, int addrlen);
  47 int NET_Accept(int s, struct sockaddr *addr, socklen_t *addrlen);
  48 int NET_SocketClose(int s);
  49 int NET_Dup2(int oldfd, int newfd);
  50 int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout);
  51 int NET_SocketAvailable(int s, jint *pbytes);
  52 
  53 void NET_ThrowUnknownHostExceptionWithGaiError(JNIEnv *env,
  54                                                const char* hostname,
  55                                                int gai_error);
  56 void NET_ThrowByNameWithLastError(JNIEnv *env, const char *name,
  57                                   const char *defaultDetail);
  58 




  18  * 2 along with this work; if not, write to the Free Software Foundation,
  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 #include <sys/poll.h>
  36 
  37 int NET_Timeout(int s, long timeout);
  38 int NET_Timeout0(int s, long timeout, long currentTime);
  39 int NET_Read(int s, void* buf, size_t len);
  40 int NET_NonBlockingRead(int s, void* buf, size_t len);
  41 int NET_TimeoutWithCurrentTime(int s, long timeout, long currentTime);
  42 long NET_GetCurrentTime();
  43 int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
  44                  struct sockaddr *from, socklen_t *fromlen);
  45 int NET_ReadV(int s, const struct iovec * vector, int count);
  46 int NET_Send(int s, void *msg, int len, unsigned int flags);
  47 int NET_SendTo(int s, const void *msg, int len,  unsigned  int
  48                flags, const struct sockaddr *to, int tolen);
  49 int NET_Writev(int s, const struct iovec * vector, int count);
  50 int NET_Connect(int s, struct sockaddr *addr, int addrlen);
  51 int NET_Accept(int s, struct sockaddr *addr, socklen_t *addrlen);
  52 int NET_SocketClose(int s);
  53 int NET_Dup2(int oldfd, int newfd);
  54 int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout);
  55 int NET_SocketAvailable(int s, jint *pbytes);
  56 
  57 void NET_ThrowUnknownHostExceptionWithGaiError(JNIEnv *env,
  58                                                const char* hostname,
  59                                                int gai_error);
  60 void NET_ThrowByNameWithLastError(JNIEnv *env, const char *name,
  61                                   const char *defaultDetail);
  62 


< prev index next >