December 10th, 2011, 08:00 PM
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:
What is the purpose of the last argument, lpszSocketAddress? My searches have been futile.
UINT nSocketPort = 0,
int nSocketType = SOCK_STREAM,
long lEvent = FD_READ | FD_WRITE | FD_OOB | FD_ACCEPT | FD_CONNECT | FD_CLOSE,
LPCTSTR lpszSocketAddress = NULL
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 220.127.116.11 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
Re: CAsyncSocket::Create arguments
- What is "visual Studio 2009"? Does it exist?
- From MSDN:
A pointer to a string containing the network address of the connected socket, a dotted number such as "18.104.22.168". Passing the NULL string for this parameter indicates the CAsyncSocket instance should listen for client activity on all network interfaces.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!