Click here to Skip to main content
       

ATL / WTL / STL

 
QuestionCAsyncSocket Send( arguments ) [modified] Pinmemberbkelly1318-Sep-12 17:13 
Windows 7, Visual Studio 2008, MFC, C++
 
Intellisense says the arguments for this method are:
 
Send( const void *lpBuf, int nBufLen, int Flasg = 0 )
An MSDN web page has example code that looks like this:
 
Send((LPCTSTR)m_sendBuffer + m_nBytesSent, 
         m_nBytesBufferSize - m_nBytesSent);

 
Either way, I cannot get the right combination. I have:
 
SYSTEMTIME m_current_time;
GetSystemTime( &m_current_time );
int t1 = sizeof( m_current_time );
int chars_sent = m_C_Server_Send_Time_Socket->Send( (LPCTSTR) m_current_time, t1,   0 );
Where m_C_Server_Send_Time_Socket is the object created from CAsyncSocket to do all the transactions once the connection has been established.
 
How should the arguments to Send() be written?
Thanks for your time


modified 18-Sep-12 22:50pm.

AnswerRe: CAsyncSocket Send( arguments ) PinmvpRichard MacCutchan18-Sep-12 22:50 
GeneralRe: CAsyncSocket Send( arguments ) Pinmemberbkelly1319-Sep-12 13:13 
AnswerRe: CAsyncSocket Send( arguments ) Pinmemberpasztorpisti30-Sep-12 0:52 
GeneralRe: CAsyncSocket Send( arguments ) PinmvpRichard MacCutchan30-Sep-12 2:07 
GeneralRe: CAsyncSocket Send( arguments ) Pinmemberpasztorpisti30-Sep-12 4:16 
GeneralRe: CAsyncSocket Send( arguments ) PinmvpRichard MacCutchan30-Sep-12 5:00 
GeneralRe: CAsyncSocket Send( arguments ) Pinmemberpasztorpisti30-Sep-12 5:07 
GeneralRe: CAsyncSocket Send( arguments ) Pinmemberpasztorpisti30-Sep-12 5:03 
GeneralRe: CAsyncSocket Send( arguments ) PinmvpRichard MacCutchan30-Sep-12 5:13 
GeneralRe: CAsyncSocket Send( arguments ) Pinmemberbkelly1330-Sep-12 6:44 
GeneralRe: CAsyncSocket Send( arguments ) PinmvpRichard MacCutchan30-Sep-12 7:10 
GeneralRe: CAsyncSocket Send( arguments ) Pinmemberpasztorpisti30-Sep-12 7:38 
GeneralRe: CAsyncSocket Send( arguments ) [modified] Pinmemberbkelly1330-Sep-12 7:16 
GeneralRe: CAsyncSocket Send( arguments ) [modified] Pinmemberpasztorpisti30-Sep-12 7:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 22 Dec 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid