Skip to content

Commit

Permalink
Merge branch 'master' of github.com:JuliaLang/julia
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Jan 26, 2013
2 parents b4d94d3 + b4f9a22 commit 0859a9f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 169 deletions.
7 changes: 4 additions & 3 deletions base/socket.jl
Expand Up @@ -297,8 +297,8 @@ listen(port::Integer) = listen(IPv4(uint32(0)),uint16(port))
listen(addr::InetAddr) = listen(addr.host,addr.port)
listen(host::IpAddr, port::Uint16) = listen(InetAddr(host,port))

listen(cb::Function,args...) = (sock=listen(args...);sock.ccb=cb;sock)
listen(cb::Function,sock::Socket) = (sock.ccb=cb;listen(sock))
listen(cb::Callback,args...) = (sock=listen(args...);sock.ccb=cb;sock)
listen(cb::Callback,sock::Socket) = (sock.ccb=cb;listen(sock))

##

Expand All @@ -320,7 +320,7 @@ end

## Utility functions

function open_any_tcp_port(cb::Function,default_port)
function open_any_tcp_port(cb::Callback,default_port)
addr = InetAddr(IPv4(uint32(0)),default_port)
while true
sock = TcpSocket()
Expand All @@ -341,3 +341,4 @@ function open_any_tcp_port(cb::Function,default_port)
end
end
end
open_any_tcp_port(default_port) = open_any_tcp_port(false,default_port)
2 changes: 1 addition & 1 deletion extras/julia_web_base.jl
Expand Up @@ -23,7 +23,7 @@ include("webrepl_msgtypes_h.jl")
###########################################

# open a socket on any port
(port,sock) = Base.open_any_tcp_port(4444,false)
(port,sock) = Base.open_any_tcp_port(4444)

# print the socket number so the server knows what it is
println(STDOUT,int16(port))
Expand Down
165 changes: 0 additions & 165 deletions test/sound.jl

This file was deleted.

0 comments on commit 0859a9f

Please sign in to comment.