Archived Forum Post

Index of archived forum posts


close hangs on delphi dll

Feb 03 '17 at 15:14

a simple socket application without ssl. Server listens on port, accepts connections and for each creating a thread. client opens a few threads, each connects to Server. Then

(a) each client sends ONCE a packet<length and="" bytes="">

(b) matched server thread sends it back

(c) each client thread reads the bytes,

ONE Send-Reply, nothing else and all the comminication is running as expoected.

But after calling CkSocket_Close( F_sock, 10000) in the server, it hangs for 10 sec. please why doesn't it return immediatly ? Have I something forgotten to do ?

if i use CkSocket_Close( F_sock, 1) to force this will I get other problems ?