Translate this code to objective-c iPhone?
Posted
by
Silent
on Stack Overflow
See other posts from Stack Overflow
or by Silent
Published on 2011-01-08T03:49:44Z
Indexed on
2011/01/08
3:53 UTC
Read the original article
Hit count: 234
Hi there would somone know how to translate this cose into iphone programming it seems like its an http message the data i would be sending is audio data im not sure which type of file. Any things helps thanks.
/////////////////////////////////////////////////////////// Using the cgi command fifo.cgi will enable the IP camera to start receiving audio data User can use Microsoft WinHTTP C/C++ API to upload the audio file http://msdn.microsoft.com/en-us/library/aa384252%28v=VS.85%29.aspx 1. Establish connection hSession = WinHttpOpen(L"WinHTTP Example/1.0",WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,WINHTTP_NO_PROXY_NAME,WINHTTP_NO_PROXY_BYPASS, 0 ); if(hSession) { USES_CONVERSION; hConnect = WinHttpConnect(hSession,A2W(m_cAddr), m_iPort,0); } 2. Establish listen request if(hConnect) hRequest = WinHttpOpenRequest(hConnect,L"POST",L"/cgi-bin/fifo.cgi",NULL,WINHTTP_NO_REFERER,WINHTTP_DEFAULT_ACCEPT_TYPES,0); if(hRequest) bResults = WinHttpSendRequest(hRequest,WINHTTP_NO_ADDITIONAL_HEADERS,0,WINHTTP_NO_REQUEST_DATA,0,uDataLength,0);
- Send audio data if( hRequest) WinHttpWriteData(hRequest, pData, nDataSize, &dwBytesWritten); //////////////////////////////////////////////////////////////////////////
© Stack Overflow or respective owner