@@ -456,7 +456,7 @@ function send(sock::UDPSocket, ipaddr::IPAddr, port::Integer, msg)
456456 finally
457457 Base. sigatomic_end ()
458458 iolock_begin ()
459- q = ct. queue; q === nothing || Base. list_deletefirst! (q:: IntrusiveLinkedList{Task} , ct)
459+ q = ct. queue; q === nothing || Base. list_deletefirst! (q:: Base. IntrusiveLinkedList{Task} , ct)
460460 if uv_req_data (uvw) != C_NULL
461461 # uvw is still alive,
462462 # so make sure we won't get spurious notifications later
474474
475475
476476# from `connect`
477- function uv_connectcb (conn:: Ptr{Cvoid} , status:: Cint )
477+ function uv_connectcb_tcp (conn:: Ptr{Cvoid} , status:: Cint )
478478 hand = ccall (:jl_uv_connect_handle , Ptr{Cvoid}, (Ptr{Cvoid},), conn)
479- sock = @handle_as hand LibuvStream
479+ sock = @handle_as hand TCPSocket
480+ connectcb (conn, status, hand, sock)
481+ end
482+
483+ function uv_connectcb_pipe (conn:: Ptr{Cvoid} , status:: Cint )
484+ hand = ccall (:jl_uv_connect_handle , Ptr{Cvoid}, (Ptr{Cvoid},), conn)
485+ sock = @handle_as hand PipeEndpoint
486+ connectcb (conn, status, hand, sock)
487+ end
488+
489+ function connectcb (conn:: Ptr{Cvoid} , status:: Cint , hand:: Ptr{Cvoid} , sock:: LibuvStream )
480490 lock (sock. cond)
481491 try
482492 if status >= 0 # success
@@ -508,7 +518,7 @@ function connect!(sock::TCPSocket, host::Union{IPv4, IPv6}, port::Integer)
508518 end
509519 host_in = Ref (hton (host. host))
510520 uv_error (" connect" , ccall (:jl_tcp_connect , Int32, (Ptr{Cvoid}, Ptr{Cvoid}, UInt16, Ptr{Cvoid}, Cint),
511- sock, host_in, hton (UInt16 (port)), @cfunction (uv_connectcb , Cvoid, (Ptr{Cvoid}, Cint)),
521+ sock, host_in, hton (UInt16 (port)), @cfunction (uv_connectcb_tcp , Cvoid, (Ptr{Cvoid}, Cint)),
512522 host isa IPv6))
513523 sock. status = StatusConnecting
514524 iolock_end ()
0 commit comments