This is in regards to bug pkcwkvrp:

http://support.realsoftware.com/feedback/viewreport.php? reportid=pkcwkvrp

If you've found that Posting with an HTTPSocket doesn't let you display progress because of a very large system buffer on Windows, you can "fix" the buffer in the socket's Connected event handler with this little snippet of code:

#if TargetWin32
// Set the sendbuffer size of this socket smaller so we get better
// progress feedback
Declare Function setsockopt Lib "Ws2_32" (s as Integer, level as integer, _
optName as integer, optval as ptr, optlen as integer) as Integer

dim x as Integer
dim mb_optval as MemoryBlock

mb_optval = NewMemoryBlock(4)
mb_optval.Long(0) = 32 * 1024 // send buffer size 32K

// SOL_SOCKET --> &hFFFF, SO_SNDBUF --> &h1001
x = setsockopt(me.Handle, &hFFFF, &h1001, mb_optval, 4)
#endif

Hope that helps someone!!

-Brad
--
Brad Hutchings
e-mail: [EMAIL PROTECTED]
weblog: http://www.ComponentX.com/weblog/brad/


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to