Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
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
Harbor 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
dCache
cta
Commits
22a2e806
Commit
22a2e806
authored
11 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
Improved the documentation of castor::io::getAddrInfo()
parent
592934aa
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
castor/io/io.hpp
+27
-10
27 additions, 10 deletions
castor/io/io.hpp
with
27 additions
and
10 deletions
castor/io/io.hpp
+
27
−
10
View file @
22a2e806
...
...
@@ -438,16 +438,33 @@ int connectWithTimeout(
* This C++ function wraps the C function getaddrinfo() and translates the errno
* based error reporting mechanism of the C function into the C++ exception
* mechanism.
*
* @param node
* @param service
* @param hints
* @param res
* @return
*/
void
getAddrInfo
(
const
char
*
node
,
const
char
*
service
,
const
struct
addrinfo
*
hints
,
struct
addrinfo
**
res
)
*
* Please note that this method is thread-safe on linux because the underlying
* getaddrinfo() function is thread-safe on linux. The same cannot be said to
* be true for MAC. If you wish to use this function in a multithreaded MAC
* application then you will have to wrap it with the appropriate thread
* locking mechanisms.
*
* @param node If the AI_NUMERICHOST flag of hints.ai_flags is set then
* this parameter can be set to a numerical network address.
* The AI_NUMERICHOST flag suppresses hostname lookups. If the
* AI_NUMERICHOST flag is not set then this parameter can be set
* to either a numerical network address or a hostname. Either
* this parameter or the service parameter can be set to NULL,
* but both cannot be set to NULL at the same time.
* @param service Sets the port number of each entry in the linked list of
* results.
* @param hints Specifies what kind of addresses are required.
* @param res Dynamically-allocated linked list of results. This linked
* list should be freed using the freeaddrinfo() C function
* which has not been wrapped in a C++ wrapper because it cannot
* return any errors.
*/
void
getAddrInfo
(
const
char
*
node
,
const
char
*
service
,
const
struct
addrinfo
*
hints
,
struct
addrinfo
**
res
)
throw
(
castor
::
exception
::
Exception
);
/**
...
...
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