Click here to Skip to main content
15,887,676 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: WIN Server 2003 Pin
David Crow24-Jan-06 6:55
David Crow24-Jan-06 6:55 
AnswerRe: WIN Server 2003 Pin
zinc_z24-Jan-06 23:33
zinc_z24-Jan-06 23:33 
GeneralRe: WIN Server 2003 Pin
David Crow25-Jan-06 3:03
David Crow25-Jan-06 3:03 
GeneralRe: WIN Server 2003 Pin
zinc_z25-Jan-06 3:58
zinc_z25-Jan-06 3:58 
QuestionRe: WIN Server 2003 Pin
David Crow25-Jan-06 5:11
David Crow25-Jan-06 5:11 
AnswerRe: WIN Server 2003 Pin
zinc_z26-Jan-06 0:22
zinc_z26-Jan-06 0:22 
GeneralRe: WIN Server 2003 Pin
David Crow26-Jan-06 2:40
David Crow26-Jan-06 2:40 
QuestionProblems using socks server for FTP Pin
Tomek.Sergey24-Jan-06 3:03
Tomek.Sergey24-Jan-06 3:03 
hi!
I cannot make my ftp client to work through my socks server. I use smartFTp, in its preferences I chose socks5 proxy without auth. For http connections (through IE) and ICQ socks server works good. I tried to use ftp client both in passive and active modes. My suspicion is that something wrong with the main relay's loop:

Code:

<code>
char swapBuffer[4096*16];
int iSendResult, iRecvResult;
tv.tv_sec = 2;
while (true)
{
memset(swapBuffer,0,sizeof(swapBuffer));
FD_ZERO(&fds_read);
FD_SET(s, &fds_read);
FD_SET(tunnelSock, &fds_read);

iSocketsSet = select(0, &fds_read, NULL, NULL, &tv);
if (pThis->m_bStopMainThread || iSocketsSet == SOCKET_ERROR )
Error();

if (iSocketsSet > 0)
{
if ( FD_ISSET(s, &fds_read) )
{
printf("Receiving data from source client\n");
iRecvResult = recv(s, swapBuffer, sizeof(swapBuffer), MSG_PEEK);
if (iRecvResult == 0)
Error();
else
{
iRecvResult = recv(s, swapBuffer, sizeof(swapBuffer), 0);
swapBuffer[iRecvResult]=0;
}

if (iRecvResult != SOCKET_ERROR && iRecvResult > 0 )
{
iSendResult = send(tunnelSock, swapBuffer, iRecvResult, 0);
}
else
Error();
}

if ( FD_ISSET(tunnelSock, &fds_read) )
{
printf("Receiving data from target server\n");
iRecvResult = recv(tunnelSock, swapBuffer, sizeof(swapBuffer), MSG_PEEK);
if (iRecvResult == 0)
Error();
else
{
iRecvResult = recv(tunnelSock, swapBuffer, sizeof(swapBuffer), 0);
swapBuffer[iRecvResult]=0;
}

if (iRecvResult != SOCKET_ERROR && iRecvResult > 0 )
{
iSendResult = send(s, swapBuffer, iRecvResult, 0);
}
else
Error();
}
}
}
</code>

Thanks for attention.


QuestionWhat is Socket Notification Sink Pin
Girish60124-Jan-06 2:56
Girish60124-Jan-06 2:56 
AnswerRe: What is Socket Notification Sink Pin
BadKarma24-Jan-06 4:24
BadKarma24-Jan-06 4:24 
GeneralRe: What is Socket Notification Sink Pin
Girish60124-Jan-06 19:25
Girish60124-Jan-06 19:25 
GeneralRe: What is Socket Notification Sink Pin
BadKarma24-Jan-06 21:08
BadKarma24-Jan-06 21:08 
GeneralRe: What is Socket Notification Sink Pin
Girish60126-Jan-06 21:38
Girish60126-Jan-06 21:38 
Questionhow to show CFormView Pin
Odiee24-Jan-06 2:47
Odiee24-Jan-06 2:47 
AnswerRe: how to show CFormView Pin
Vipin Aravind24-Jan-06 3:21
Vipin Aravind24-Jan-06 3:21 
Questiongracefull shutdown Pin
Rajni Kant24-Jan-06 2:23
Rajni Kant24-Jan-06 2:23 
QuestionCustom combobox Pin
Nishad S24-Jan-06 1:40
Nishad S24-Jan-06 1:40 
AnswerRe: Custom combobox Pin
James Brown24-Jan-06 8:24
James Brown24-Jan-06 8:24 
GeneralRe: Custom combobox Pin
Nishad S24-Jan-06 16:42
Nishad S24-Jan-06 16:42 
QuestionError occure when destructor is not virtual ? Pin
vikas amin24-Jan-06 1:28
vikas amin24-Jan-06 1:28 
AnswerRe: Error occure when destructor is not virtual ? Pin
Cedric Moonen24-Jan-06 2:51
Cedric Moonen24-Jan-06 2:51 
GeneralRe: Error occure when destructor is not virtual ? Pin
vikas amin24-Jan-06 19:22
vikas amin24-Jan-06 19:22 
AnswerRe: Error occure when destructor is not virtual ? Pin
sunit524-Jan-06 6:47
sunit524-Jan-06 6:47 
QuestionInstaller pack of MFC app. Pin
Aryan S24-Jan-06 1:26
Aryan S24-Jan-06 1:26 
QuestionStatic WndProc() Pin
virtualrush24-Jan-06 1:25
virtualrush24-Jan-06 1:25 

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

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