Fixed build path locations. Cleaned up code formatting
parent
96d749b00c
commit
6d97133bb8
|
@ -26,7 +26,7 @@
|
|||
|
||||
# Note that we are ONLY updating the JNI binaries, NOT THE JAVA CODE. So you will want to replace the appropriate files
|
||||
# inside the bundle jar.
|
||||
CORE_NAME=libbarchart-udt-core-2.3.1.1
|
||||
CORE_NAME=libbarchart-udt-core-2.3.2
|
||||
TARGET_PATH=../../dorkbox/Dorkbox-Network/natives
|
||||
JVM=jvm
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
include make_common.mak
|
||||
|
||||
DIST_NAME=$(CORE_NAME).so
|
||||
DIST_PATH=windows_$(COMPILE_OS_ARCH)
|
||||
DIST_PATH=linux_$(COMPILE_OS_ARCH)
|
||||
|
||||
CPP=g++
|
||||
STRIP=strip
|
||||
|
@ -45,7 +45,7 @@ all: dist-clean udt
|
|||
@echo "\nDONE WITH COMPILE...."
|
||||
$(STRIP) --strip-debug --strip-unneeded $(DIST_NAME)
|
||||
@mkdir -p "$(TARGET_PATH)/$(DIST_OS_NAME)"
|
||||
@mv "$(DIST_NAME)" "$(TARGET_PATH)/$(DIST_OS_NAME)"
|
||||
mv "$(DIST_NAME)" "$(TARGET_PATH)/$(DIST_OS_NAME)"
|
||||
@# now cleanup
|
||||
@$(MAKE) -s -f make_common.mak clean
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
include make_common.mak
|
||||
|
||||
DIST_NAME=$(CORE_NAME).dylib
|
||||
DIST_PATH=windows_$(COMPILE_OS_ARCH)
|
||||
DIST_PATH=macosx_$(COMPILE_OS_ARCH)
|
||||
|
||||
CPP=i686-apple-darwin10-g++
|
||||
STRIP=i686-apple-darwin10-strip
|
||||
|
@ -51,7 +51,7 @@ CCFLAGS += -DMACOSX
|
|||
all: dist-clean udt
|
||||
@echo "\nDONE WITH COMPILE...."
|
||||
@mkdir -p "$(TARGET_PATH)/$(DIST_OS_NAME)"
|
||||
@mv "$(DIST_NAME)" "$(TARGET_PATH)/$(DIST_OS_NAME)"
|
||||
mv "$(DIST_NAME)" "$(TARGET_PATH)/$(DIST_OS_NAME)"
|
||||
@# now cleanup
|
||||
@$(MAKE) -s -f make_common.mak clean
|
||||
|
||||
|
|
|
@ -61,6 +61,6 @@ all: dist-clean udt
|
|||
@# now strip the DLL of unneeded, since it can be HUGE
|
||||
$(STRIP) --strip-debug --strip-unneeded $(DIST_NAME)
|
||||
@mkdir -p "$(TARGET_PATH)/$(DIST_OS_NAME)"
|
||||
@mv "$(DIST_NAME)" "$(TARGET_PATH)/$(DIST_OS_NAME)"
|
||||
mv "$(DIST_NAME)" "$(TARGET_PATH)/$(DIST_OS_NAME)"
|
||||
@$(MAKE) -s -f make_common.mak clean
|
||||
|
||||
|
|
18
src/core.cpp
18
src/core.cpp
|
@ -910,23 +910,23 @@ void CUDT::connect(const sockaddr* peer, CHandShake* hs)
|
|||
delete [] buffer;
|
||||
}
|
||||
|
||||
void CUDT::flush() {
|
||||
|
||||
void CUDT::flush()
|
||||
{
|
||||
uint64_t entertime = CTimer::getTime();
|
||||
|
||||
while (!m_bBroken && m_bConnected && (m_pSndBuffer->getCurrBufSize() > 0) && (CTimer::getTime() - entertime < m_Linger.l_linger * 1000000ULL))
|
||||
{
|
||||
// linger has been checked by previous close() call and has expired
|
||||
if (m_ullLingerExpiration >= entertime)
|
||||
break;
|
||||
// linger has been checked by previous close() call and has expired
|
||||
if (m_ullLingerExpiration >= entertime)
|
||||
break;
|
||||
|
||||
if (!m_bSynSending)
|
||||
if (!m_bSynSending)
|
||||
{
|
||||
// if this socket enables asynchronous sending, return immediately and let GC to close it later
|
||||
if (0 == m_ullLingerExpiration)
|
||||
// if this socket enables asynchronous sending, return immediately and let GC to close it later
|
||||
if (0 == m_ullLingerExpiration)
|
||||
m_ullLingerExpiration = entertime + m_Linger.l_linger * 1000000ULL;
|
||||
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef WINDOWS
|
||||
|
|
|
@ -25,7 +25,7 @@ extern "C" {
|
|||
#define com_barchart_udt_SocketUDT_INFINITE_TTL -1L
|
||||
|
||||
#undef com_barchart_udt_SocketUDT_SIGNATURE_JNI
|
||||
#define com_barchart_udt_SocketUDT_SIGNATURE_JNI 20130512L
|
||||
#define com_barchart_udt_SocketUDT_SIGNATURE_JNI 20150706L
|
||||
|
||||
#undef com_barchart_udt_SocketUDT_TIMEOUT_INFINITE
|
||||
#define com_barchart_udt_SocketUDT_TIMEOUT_INFINITE -1L
|
||||
|
|
Loading…
Reference in New Issue