-
December 10th, 2011, 08:00 PM
#1
CAsyncSocket::Create arguments
Windows XP, visual Studio 2009, C++, object: creating a simple non blocking server class.
After instantiating the CAsyncSocket Create is called. But the options are not all explained. From the help file:
Code:
BOOL Create(
UINT nSocketPort = 0,
int nSocketType = SOCK_STREAM,
long lEvent = FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE,
LPCTSTR lpszSocketAddress = NULL
);
What is the purpose of the last argument, lpszSocketAddress? My searches have been futile.
Motivation: Several computers pass telemetry data and my server app will feed a computer that processes the data. I want the high data rate channel to use a particular connection between the two computers. If I put the IP address of 192.10.10.50 in this argument, will that serve to, or assist in, guarenteeing that this data path will use that IP address?
This is the server end of that conversation it so the third argument will be FD_ACCEPT. Is that correct?
-
December 11th, 2011, 03:17 AM
#2
Re: CAsyncSocket::Create arguments
- What is "visual Studio 2009"? Does it exist?
- From MSDN:
lpszSockAddress
A pointer to a string containing the network address of the connected socket, a dotted number such as "128.56.22.8". Passing the NULL string for this parameter indicates the CAsyncSocket instance should listen for client activity on all network interfaces.
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|