mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
x.net: fix new_tcp_socket()
This commit is contained in:
parent
fa8f5df817
commit
702a80fc5a
@ -6,6 +6,7 @@ pub const (
|
||||
used_import = 1 + fontstash.used_import
|
||||
)
|
||||
|
||||
/*
|
||||
#flag windows -I @VROOT/thirdparty/freetype/include
|
||||
#flag windows -L @VROOT/thirdparty/freetype/win64
|
||||
|
||||
@ -22,6 +23,7 @@ pub const (
|
||||
#flag darwin -lfreetype
|
||||
|
||||
#flag darwin -lpng -lbz2 -lz
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
@ -273,8 +273,8 @@ fn new_tcp_socket() ?TcpSocket {
|
||||
s := TcpSocket {
|
||||
handle: sockfd
|
||||
}
|
||||
s.set_option_bool(.reuse_addr, true)?
|
||||
//s.set_option_int(.reuse_addr, 1)?
|
||||
//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))?
|
||||
|
@ -8,7 +8,7 @@ interface WebsocketIO {
|
||||
socket_write(bytes []byte) ?
|
||||
}
|
||||
|
||||
// socket_read_into reads into the provided buffer with it's lenght
|
||||
// socket_read_into reads into the provided buffer with its length
|
||||
fn (mut ws Client) socket_read_into(mut buffer []byte) ?int {
|
||||
lock {
|
||||
if ws.is_ssl {
|
||||
|
Loading…
Reference in New Issue
Block a user