Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
232f0766
Commit
232f0766
authored
10 years ago
by
Konstantin Osipov
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.com:tarantool/tarantool
parents
1a3510e9
82d09b8c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lua/bsdsocket.cc
+11
-1
11 additions, 1 deletion
src/lua/bsdsocket.cc
src/lua/bsdsocket.lua
+8
-2
8 additions, 2 deletions
src/lua/bsdsocket.lua
with
19 additions
and
3 deletions
src/lua/bsdsocket.cc
+
11
−
1
View file @
232f0766
...
...
@@ -156,7 +156,6 @@ static const struct { char name[32]; int value, type, rw; } so_opts[] = {
{
"SO_PASSCRED"
,
SO_PASSCRED
,
1
,
1
,
},
{
"SO_PEERCRED"
,
SO_PEERCRED
,
1
,
0
,
},
{
"SO_PRIORITY"
,
SO_PRIORITY
,
1
,
1
,
},
{
"SO_PROTOCOL"
,
SO_PROTOCOL
,
1
,
0
,
},
{
"SO_RCVBUF"
,
SO_RCVBUF
,
1
,
1
,
},
{
"SO_RCVBUFFORCE"
,
SO_RCVBUFFORCE
,
1
,
1
,
},
{
"SO_RCVLOWAT"
,
SO_RCVLOWAT
,
1
,
1
,
},
...
...
@@ -167,7 +166,18 @@ static const struct { char name[32]; int value, type, rw; } so_opts[] = {
{
"SO_SNDBUF"
,
SO_SNDBUF
,
1
,
1
,
},
{
"SO_SNDBUFFORCE"
,
SO_SNDBUFFORCE
,
1
,
1
,
},
{
"SO_TIMESTAMP"
,
SO_TIMESTAMP
,
1
,
1
,
},
#ifdef SO_PROTOCOL
{
"SO_PROTOCOL"
,
SO_PROTOCOL
,
1
,
0
,
},
#else
#define SO_PROTOCOL 38
#endif
#ifdef SO_TYPE
{
"SO_TYPE"
,
SO_TYPE
,
1
,
0
,
},
#else
#define SO_TYPE 3
#endif
{
""
,
0
,
0
,
0
,
}
};
...
...
This diff is collapsed.
Click to expand it.
src/lua/bsdsocket.lua
+
8
−
2
View file @
232f0766
...
...
@@ -473,6 +473,10 @@ socket_methods.accept = function(self)
self
.
_errno
=
box
.
errno
()
return
nil
end
-- Make socket to be non-blocked by default
-- ignore result
ffi
.
C
.
bsdsocket_nonblock
(
fh
,
1
)
local
socket
=
{
fh
=
fh
}
setmetatable
(
socket
,
box
.
socket
.
internal
.
socket_mt
)
...
...
@@ -758,8 +762,10 @@ local function create_socket(self, domain, stype, proto)
-- Make socket to be non-blocked by default
if
ffi
.
C
.
bsdsocket_nonblock
(
fh
,
1
)
<
0
then
ffi
.
C
.
close
(
fh
)
return
nil
local
errno
=
box
.
errno
()
ffi
.
C
.
close
(
fh
)
box
.
errno
(
errno
)
return
nil
end
local
socket
=
{
fh
=
fh
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment