Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 28th, 2010, 7:11 AM   #1
Apprentice123
Hobbyist Programmer
 
Join Date: May 2009
Posts: 151
Rep Power: 0 Apprentice123 is an unknown quantity at this point
socklen_t

I need use the function socklen_t from the library <sys/socket.h>. It has a library containing socklen_t for windows?
This function returns the length of the struct in bytes? If yes, is done in c++?
Apprentice123 is offline   Reply With Quote
Old Oct 28th, 2010, 8:36 AM   #2
L7Sqr
Professional Programmer
 
Join Date: Jun 2005
Location: here
Posts: 440
Rep Power: 10 L7Sqr will become famous soon enough
Re: socklen_t

There is no function socklen_t. socklen_t is a type - you use it to describe (or store) the size of something. For example the system call accept wont know the size of the resulting struct until after it is invoked and announces this size through the socklen_t parameter.
__________________
"...and though our kids are blessed their parents let them shoulder all the blame."
- The Quiet Things That No One Ever Knows [BrandNew]

My Blog
L7Sqr is offline   Reply With Quote
Old Oct 28th, 2010, 8:57 AM   #3
Apprentice123
Hobbyist Programmer
 
Join Date: May 2009
Posts: 151
Rep Power: 0 Apprentice123 is an unknown quantity at this point
Re: socklen_t

Quote:
Originally Posted by L7Sqr View Post
There is no function socklen_t. socklen_t is a type - you use it to describe (or store) the size of something. For example the system call accept wont know the size of the resulting struct until after it is invoked and announces this size through the socklen_t parameter.
socklen_t no has on Windows. What can I use?
Apprentice123 is offline   Reply With Quote
Old Oct 28th, 2010, 9:10 AM   #4
Ancient Dragon
Achieved Level 70

 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 4,345
Rep Power: 10 Ancient Dragon will become famous soon enoughAncient Dragon will become famous soon enough
Re: socklen_t

Do you have any idea what you want?? socklen_t is defined in WS2tcpip.h as typedef int socklen_t;
__________________
PFO's FAQ is here
Forum Rules

There is no cow level (Diablo III)
If you never push yourself you will never improve (Diablo III)
Ancient Dragon is offline   Reply With Quote
Old Oct 28th, 2010, 9:21 AM   #5
Apprentice123
Hobbyist Programmer
 
Join Date: May 2009
Posts: 151
Rep Power: 0 Apprentice123 is an unknown quantity at this point
Re: socklen_t

Quote:
Originally Posted by Ancient Dragon View Post
Do you have any idea what you want?? socklen_t is defined in WS2tcpip.h as typedef int socklen_t;
OK. Thank you.
I declared:
#include <fcntl.h>

But program do not recognize the function: fcntl() why ?
Apprentice123 is offline   Reply With Quote
Old Oct 28th, 2010, 9:51 AM   #6
Ancient Dragon
Achieved Level 70

 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 4,345
Rep Power: 10 Ancient Dragon will become famous soon enoughAncient Dragon will become famous soon enough
Re: socklen_t

That is a *nix-specific function which is not supported by MS-Windows.
__________________
PFO's FAQ is here
Forum Rules

There is no cow level (Diablo III)
If you never push yourself you will never improve (Diablo III)
Ancient Dragon is offline   Reply With Quote
Old Oct 28th, 2010, 10:28 AM   #7
Apprentice123
Hobbyist Programmer
 
Join Date: May 2009
Posts: 151
Rep Power: 0 Apprentice123 is an unknown quantity at this point
Re: socklen_t

Quote:
Originally Posted by Ancient Dragon View Post
That is a *nix-specific function which is not supported by MS-Windows.
And it has some function equivalent for windows?
Apprentice123 is offline   Reply With Quote
Old Oct 28th, 2010, 12:14 PM   #8
Ancient Dragon
Achieved Level 70

 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 4,345
Rep Power: 10 Ancient Dragon will become famous soon enoughAncient Dragon will become famous soon enough
Re: socklen_t

It depends on what you want to do.
__________________
PFO's FAQ is here
Forum Rules

There is no cow level (Diablo III)
If you never push yourself you will never improve (Diablo III)
Ancient Dragon is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:05 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC