Click here to Skip to main content
15,904,287 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionOverview of a Handle Pin
Kotesh.N13-Mar-07 18:33
Kotesh.N13-Mar-07 18:33 
AnswerRe: Overview of a Handle Pin
Paresh Chitte13-Mar-07 18:45
Paresh Chitte13-Mar-07 18:45 
AnswerRe: Overview of a Handle Pin
Stephen Hewitt13-Mar-07 20:45
Stephen Hewitt13-Mar-07 20:45 
AnswerRe: Overview of a Handle Pin
ThatsAlok15-Mar-07 1:17
ThatsAlok15-Mar-07 1:17 
Questionhelp me about ctrl+c&v on edit box Pin
zhaohaicheng13-Mar-07 17:47
zhaohaicheng13-Mar-07 17:47 
Questionstrin find Pin
deeps_cute13-Mar-07 17:45
deeps_cute13-Mar-07 17:45 
AnswerRe: strin find Pin
Hamid_RT13-Mar-07 18:12
Hamid_RT13-Mar-07 18:12 
QuestionError in Network based application Pin
Vichitram13-Mar-07 17:40
Vichitram13-Mar-07 17:40 
Hi,

I have a Win32 Console Application. I am using VC 6.0

My program is a TCP based Client Server Aplication. In the Server part, I have a variable defined for SOCKADDR_IN.

SOCKADDR_IN saServer;

LPHOSTENT lpHostEntry = gethostbyname(clientIP);

saServer1.sin_family = AF_INET;
saServer1.sin_addr = *((LPIN_ADDR)*lpHostEntry->h_addr_list);
saServer1.sin_port = htons(3500);

Then, when I am running the program, binding error occurs. This is when I am trying with the server and client programs in different machines. But in the localhost, it is working.


But, if I am trying it with address set to INADDR_ANY, it is working(both in the localhost and with different machines).

saServer1.sin_addr.s_addr = INADDR_ANY ;


Why does this happen? Actually I am confused. Is there any problem with binding a socket to a port with a known address or what is the difference between the two scenarios?.

Please can anyone help me?

AnswerRe: Error in Network based application Pin
Mark Salsbery14-Mar-07 6:53
Mark Salsbery14-Mar-07 6:53 
QuestionSystem!!! Pin
Tran Ngoc Minh13-Mar-07 17:29
Tran Ngoc Minh13-Mar-07 17:29 
AnswerRe: System!!! Pin
Hamid_RT13-Mar-07 18:16
Hamid_RT13-Mar-07 18:16 
QuestionOnLButtonDown Pin
Aint13-Mar-07 16:45
Aint13-Mar-07 16:45 
AnswerRe: OnLButtonDown Pin
Hamid_RT13-Mar-07 18:14
Hamid_RT13-Mar-07 18:14 
GeneralRe: OnLButtonDown Pin
Aint13-Mar-07 18:37
Aint13-Mar-07 18:37 
GeneralRe: OnLButtonDown Pin
Parthi_Appu13-Mar-07 19:10
Parthi_Appu13-Mar-07 19:10 
GeneralRe: OnLButtonDown Pin
Aint13-Mar-07 20:06
Aint13-Mar-07 20:06 
GeneralRe: OnLButtonDown Pin
Hamid_RT13-Mar-07 20:23
Hamid_RT13-Mar-07 20:23 
AnswerRe: OnLButtonDown Pin
William.Wang13-Mar-07 19:21
William.Wang13-Mar-07 19:21 
QuestionAlphaBlend() strange colors. Pin
PatrykDabrowski13-Mar-07 13:05
PatrykDabrowski13-Mar-07 13:05 
QuestionRe: AlphaBlend() strange colors. Pin
Mark Salsbery13-Mar-07 16:04
Mark Salsbery13-Mar-07 16:04 
QuestionRe: AlphaBlend() strange colors. Pin
PatrykDabrowski20-Mar-07 2:01
PatrykDabrowski20-Mar-07 2:01 
AnswerRe: AlphaBlend() strange colors. Pin
Mark Salsbery20-Mar-07 7:45
Mark Salsbery20-Mar-07 7:45 
Questioncompatibility problem Pin
duca_andrei13-Mar-07 11:11
duca_andrei13-Mar-07 11:11 
AnswerRe: compatibility problem Pin
Paresh Chitte13-Mar-07 18:37
Paresh Chitte13-Mar-07 18:37 
QuestionClearing data Pin
eRose2413-Mar-07 11:10
eRose2413-Mar-07 11:10 

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.