equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
270 jint fd = fdval(env, fdo); |
270 jint fd = fdval(env, fdo); |
271 struct linger l; |
271 struct linger l; |
272 int len = sizeof(l); |
272 int len = sizeof(l); |
273 if (getsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&l, &len) == 0) { |
273 if (getsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&l, &len) == 0) { |
274 if (l.l_onoff == 0) { |
274 if (l.l_onoff == 0) { |
275 WSASendDisconnect(fd, NULL); |
275 shutdown(fd, SD_SEND); |
276 } |
276 } |
277 } |
277 } |
278 } |
278 } |
279 |
279 |
280 JNIEXPORT void JNICALL |
280 JNIEXPORT void JNICALL |