mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
gg: image: return an optional instead of panic(); darwin: fix nsstring()
This commit is contained in:
@@ -274,6 +274,7 @@ fn new_tcp_socket() ?TcpSocket {
|
||||
handle: sockfd
|
||||
}
|
||||
s.set_option_bool(.reuse_addr, true)?
|
||||
//s.set_option_int(.reuse_addr, 1)?
|
||||
$if windows {
|
||||
t := true
|
||||
socket_error(C.ioctlsocket(sockfd, fionbio, &t))?
|
||||
@@ -352,4 +353,4 @@ pub fn (s TcpSocket) address() ?Addr {
|
||||
sockaddr := &C.sockaddr(&addr)
|
||||
C.getsockname(s.handle, sockaddr, &size)
|
||||
return new_addr(sockaddr, '', 0)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user