Click here to Skip to main content
16,005,826 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMFC:OnLButtonDown() Pin
Lin_d_200026-Feb-03 13:15
sussLin_d_200026-Feb-03 13:15 
GeneralRe: MFC:OnLButtonDown() Pin
Big Art26-Feb-03 14:29
Big Art26-Feb-03 14:29 
GeneralFiles and Streams Pin
ursus zeta26-Feb-03 13:13
ursus zeta26-Feb-03 13:13 
GeneralRe: Files and Streams Pin
Christian Graus26-Feb-03 13:30
protectorChristian Graus26-Feb-03 13:30 
GeneralRe: Files and Streams Pin
berndg26-Feb-03 21:04
berndg26-Feb-03 21:04 
GeneralHUGE Thanks Pin
ursus zeta27-Feb-03 6:14
ursus zeta27-Feb-03 6:14 
GeneralTCP/IP question Pin
User 988526-Feb-03 12:26
User 988526-Feb-03 12:26 
GeneralRe: TCP/IP question Pin
geo_m26-Feb-03 21:40
geo_m26-Feb-03 21:40 
Hi,

You need to do such a translation in both directions (when you change port A to X on incoming packets you have to change the X to A on outgoing packets in the same 'connection').

If I very simplify the problem - if you change the port on recvd packet from say 80 to 8080, the ip stack on your machine will have no problem with it, but as a response he will send back to the connection originator reply from port 8080. If you will not change this number back from 8080 to 80, it will be delivered to the connection originator, but he will just drop it, because he didn't require connection to port 8080, but to 80.

For that very some reason your software must stay in the way as a proxy as long as the connection will remain. (because the same rule is valid for 'regular' data packets - the client doesn't expect packets from 8080, so it will be dropped)

Anyway, what you wrote will not work, but the ip stack (winsock) will not go into some indeterminate state Wink | ;) .

Hope this helps you, if you have another question you can ask, I worked on project where exactly this kind of problems were solved Wink | ;) unfortunately the management spent all money for a new cars, buildings etc ...as usual... Frown | :(
GeneralRe: TCP/IP question Pin
User 988527-Feb-03 3:19
User 988527-Feb-03 3:19 
GeneralRe: TCP/IP question Pin
geo_m27-Feb-03 3:38
geo_m27-Feb-03 3:38 
GeneralRe: TCP/IP question Pin
User 988527-Feb-03 3:52
User 988527-Feb-03 3:52 
GeneralPICTUREBOX Drawing Problems... Pin
JoeSox26-Feb-03 12:00
JoeSox26-Feb-03 12:00 
GeneralRe: PICTUREBOX Drawing Problems... Pin
Chris Richardson28-Feb-03 7:39
Chris Richardson28-Feb-03 7:39 
GeneralRe: PICTUREBOX Drawing Problems... Pin
JoeSox4-Mar-03 16:20
JoeSox4-Mar-03 16:20 
GeneralRe: PICTUREBOX Drawing Problems... Pin
Chris Richardson5-Mar-03 7:38
Chris Richardson5-Mar-03 7:38 
GeneralRe: PICTUREBOX Drawing Problems... Pin
JoeSox5-Mar-03 20:30
JoeSox5-Mar-03 20:30 
GeneralRe: PICTUREBOX Drawing Problems... Pin
palbano28-Feb-03 8:24
palbano28-Feb-03 8:24 
GeneralRe: PICTUREBOX Drawing Problems... Pin
JoeSox4-Mar-03 16:23
JoeSox4-Mar-03 16:23 
GeneralRe: PICTUREBOX Drawing Problems... Pin
Nitron28-Feb-03 13:37
Nitron28-Feb-03 13:37 
GeneralRe: PICTUREBOX Drawing Problems... Pin
JoeSox4-Mar-03 16:26
JoeSox4-Mar-03 16:26 
GeneralRe: PICTUREBOX Drawing Problems... Pin
JoeSox5-Mar-03 20:31
JoeSox5-Mar-03 20:31 
GeneralRe: PICTUREBOX Drawing Problems... Pin
Nitron6-Mar-03 4:11
Nitron6-Mar-03 4:11 
QuestionGetting path and filename of the calling executable? Pin
Anonymous26-Feb-03 11:50
Anonymous26-Feb-03 11:50 
AnswerRe: Getting path and filename of the calling executable? Pin
Chris Richardson26-Feb-03 11:53
Chris Richardson26-Feb-03 11:53 
GeneralRe: Getting path and filename of the calling executable? Pin
MAAK26-Feb-03 12:38
MAAK26-Feb-03 12:38 

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.