jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c
changeset 23015 73b21ab36615
parent 23010 6dadb192ad81
child 25551 62ad60d30644
equal deleted inserted replaced
23014:af8145529dd4 23015:73b21ab36615
    35 #include "java_net_TwoStacksPlainSocketImpl.h"
    35 #include "java_net_TwoStacksPlainSocketImpl.h"
    36 #include "java_net_InetAddress.h"
    36 #include "java_net_InetAddress.h"
    37 #include "java_io_FileDescriptor.h"
    37 #include "java_io_FileDescriptor.h"
    38 #include "java_lang_Integer.h"
    38 #include "java_lang_Integer.h"
    39 
    39 
    40 #include "jvm.h"
       
    41 #include "net_util.h"
    40 #include "net_util.h"
    42 #include "jni_util.h"
    41 #include "jni_util.h"
    43 
    42 
    44 /************************************************************************
    43 /************************************************************************
    45  * TwoStacksPlainSocketImpl
    44  * TwoStacksPlainSocketImpl
   471     } else {
   470     } else {
   472         rv = NET_WinBind(fd, (struct sockaddr *)&him, len, exclBind);
   471         rv = NET_WinBind(fd, (struct sockaddr *)&him, len, exclBind);
   473     }
   472     }
   474 
   473 
   475     if (rv == -1) {
   474     if (rv == -1) {
   476         NET_ThrowCurrent(env, "JVM_Bind");
   475         NET_ThrowCurrent(env, "NET_Bind");
   477         return;
   476         return;
   478     }
   477     }
   479 
   478 
   480     /* set the address */
   479     /* set the address */
   481     (*env)->SetObjectField(env, this, psi_addressID, iaObj);
   480     (*env)->SetObjectField(env, this, psi_addressID, iaObj);
  1160             return;
  1159             return;
  1161         }
  1160         }
  1162 
  1161 
  1163     }
  1162     }
  1164     n = send(fd, (char *)&data, 1, MSG_OOB);
  1163     n = send(fd, (char *)&data, 1, MSG_OOB);
  1165     if (n == JVM_IO_ERR) {
  1164     if (n == -1) {
  1166         NET_ThrowCurrent(env, "send");
  1165         NET_ThrowCurrent(env, "send");
  1167         return;
  1166         return;
  1168     }
  1167     }
  1169     if (n == JVM_IO_INTR) {
  1168 }
  1170         JNU_ThrowByName(env, "java/io/InterruptedIOException", 0);
       
  1171         return;
       
  1172     }
       
  1173 }