Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
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
Main
Synchronet
Commits
d4f7a52a
Commit
d4f7a52a
authored
19 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added WinSock2 and SunOS socket options to socket_option list.
parent
b25cd007
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/xpdev/sockwrap.c
+26
-1
26 additions, 1 deletion
src/xpdev/sockwrap.c
src/xpdev/sockwrap.h
+4
-4
4 additions, 4 deletions
src/xpdev/sockwrap.h
with
30 additions
and
5 deletions
src/xpdev/sockwrap.c
+
26
−
1
View file @
d4f7a52a
...
...
@@ -48,24 +48,46 @@
static
socket_option_t
socket_options
[]
=
{
{
"TYPE"
,
0
,
SOL_SOCKET
,
SO_TYPE
},
{
"ERROR"
,
0
,
SOL_SOCKET
,
SO_ERROR
},
{
"DEBUG"
,
0
,
SOL_SOCKET
,
SO_DEBUG
},
{
"LINGER"
,
SOCK_STREAM
,
SOL_SOCKET
,
SO_LINGER
},
{
"SNDBUF"
,
0
,
SOL_SOCKET
,
SO_SNDBUF
},
{
"RCVBUF"
,
0
,
SOL_SOCKET
,
SO_RCVBUF
},
#ifndef _WINSOCKAPI_
#ifndef _WINSOCKAPI_
/* Defined, but not supported, by WinSock */
{
"SNDLOWAT"
,
0
,
SOL_SOCKET
,
SO_SNDLOWAT
},
{
"RCVLOWAT"
,
0
,
SOL_SOCKET
,
SO_RCVLOWAT
},
{
"SNDTIMEO"
,
0
,
SOL_SOCKET
,
SO_SNDTIMEO
},
{
"RCVTIMEO"
,
0
,
SOL_SOCKET
,
SO_RCVTIMEO
},
#ifdef SO_USELOOPBACK
/* SunOS */
{
"USELOOPBACK"
,
0
,
SOL_SOCKET
,
SO_USELOOPBACK
},
#endif
#endif
{
"REUSEADDR"
,
0
,
SOL_SOCKET
,
SO_REUSEADDR
},
{
"KEEPALIVE"
,
SOCK_STREAM
,
SOL_SOCKET
,
SO_KEEPALIVE
},
{
"DONTROUTE"
,
0
,
SOL_SOCKET
,
SO_DONTROUTE
},
{
"BROADCAST"
,
SOCK_DGRAM
,
SOL_SOCKET
,
SO_BROADCAST
},
{
"OOBINLINE"
,
SOCK_STREAM
,
SOL_SOCKET
,
SO_OOBINLINE
},
#ifdef SO_ACCEPTCONN
{
"ACCEPTCONN"
,
SOCK_STREAM
,
SOL_SOCKET
,
SO_ACCEPTCONN
},
#endif
#ifdef SO_PRIORITY
/* Linux */
{
"PRIORITY"
,
0
,
SOL_SOCKET
,
SO_PRIORITY
},
#endif
#ifdef SO_NO_CHECK
/* Linux */
{
"NO_CHECK"
,
0
,
SOL_SOCKET
,
SO_NO_CHECK
},
#endif
#ifdef SO_PROTOTYPE
/* SunOS */
{
"PROTOTYPE"
,
0
,
SOL_SOCKET
,
SO_PROTOTYPE
},
#endif
#ifdef SO_MAX_MSG_SIZE
/* WinSock2 */
{
"MAX_MSG_SIZE"
,
SOCK_DGRAM
,
SOL_SOCKET
,
SO_MAX_MSG_SIZE
},
#endif
#ifdef SO_CONNECT_TIME
/* WinSock2 */
{
"CONNECT_TIME"
,
SOCK_STREAM
,
SOL_SOCKET
,
SO_CONNECT_TIME
},
#endif
/* IPPROTO-level socket options */
{
"TCP_NODELAY"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_NODELAY
},
...
...
@@ -85,6 +107,9 @@ static socket_option_t socket_options[] = {
#ifdef TCP_KEEPCNT
{
"TCP_KEEPCNT"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_KEEPCNT
},
#endif
#ifdef TCP_KEEPALIVE
/* SunOS */
{
"TCP_KEEPALIVE"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_KEEPALIVE
},
#endif
#ifdef TCP_SYNCNT
{
"TCP_SYNCNT"
,
SOCK_STREAM
,
IPPROTO_TCP
,
TCP_SYNCNT
},
#endif
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/sockwrap.h
+
4
−
4
View file @
d4f7a52a
...
...
@@ -45,11 +45,11 @@
/***************/
#if defined(_WIN32)
/* Use WinSock */
#include
<winsock.h>
/* socket/bind/etc. */
/* Let's agree on a standard WinSock symbol here, people */
#ifndef _WINSOCKAPI_
#define _WINSOCKAPI_
#include
<winsock2.h>
/* socket/bind/etc. */
#include
<mswsock.h>
/* Microsoft WinSock2 extensions */
/* Let's agree on a standard WinSock symbol here, people */
#define _WINSOCKAPI_
#endif
#elif defined __unix__
/* Unix-variant */
...
...
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