File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 849849 e .SO_SNDTIMEO = 4101
850850 e .POLLIN = 768
851851 e .POLLPRI = 1024
852+ e .POLLOUT = 16
852853 e .SO_TYPE = 4104
853854 e .POLLRDBAND = 512
854855 e .POLLWRBAND = 32
@@ -1245,6 +1246,12 @@ do
12451246 function meta :set_option (key , val , level )
12461247 level = level or " socket"
12471248
1249+ -- Windows doesn't support SO_BROADCAST on SOCK_STREAM sockets
1250+ if ffi .os == " Windows" and key :lower () == " broadcast" and self .socket_type == " stream" then
1251+ -- Silently succeed for compatibility
1252+ return true
1253+ end
1254+
12481255 if key :lower () == " rcvtimeo" then
12491256 if ffi .os == " Windows" then
12501257 val = ffi .new (" int[1]" , val )
@@ -1279,6 +1286,12 @@ do
12791286 function meta :get_option (key , level )
12801287 level = level or " socket"
12811288
1289+ -- Windows doesn't support SO_BROADCAST on SOCK_STREAM sockets
1290+ if ffi .os == " Windows" and key :lower () == " broadcast" and self .socket_type == " stream" then
1291+ -- Return 0 (disabled) for compatibility
1292+ return 0
1293+ end
1294+
12821295 local env = SO
12831296
12841297 if level == " tcp" then env = TCP end
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ local loaders = {
164164 " Microsoft Unified Security Protocol Provider" ,
165165 SECPKG_CRED_OUTBOUND ,
166166 nil ,
167- nil ,
167+ ffi . cast ( " void* " , nil ) ,
168168 nil ,
169169 nil ,
170170 hCreds ,
You can’t perform that action at this time.
0 commit comments