SERVENT structure (winsock.h)
The servent structure is used to store or return the name and service number for a given service name.
Syntax
typedef struct servent {
char *s_name;
char **s_aliases;
#if ...
char *s_proto;
#if ...
short s_port;
#else
short s_port;
#endif
#else
char *s_proto;
#endif
} SERVENT, *PSERVENT, *LPSERVENT;
Members
s_name
The official name of the service.
s_aliases
A NULL-terminated array of alternate names.
s_proto
The name of the protocol to use when contacting the service.
s_port
The port number at which the service can be contacted. Port numbers are returned in network byte order.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | winsock.h (include Winsock2.h) |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for