Click here to Skip to main content
15,900,108 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: socket programming using vc++ Pin
Garth J Lancaster18-Jun-09 0:52
professionalGarth J Lancaster18-Jun-09 0:52 
GeneralRe: socket programming using vc++ Pin
rahuljin18-Jun-09 1:14
rahuljin18-Jun-09 1:14 
AnswerRe: socket programming using vc++ Pin
norish17-Jun-09 2:40
norish17-Jun-09 2:40 
GeneralRe: socket programming using vc++ Pin
rahuljin17-Jun-09 3:17
rahuljin17-Jun-09 3:17 
GeneralRe: socket programming using vc++ Pin
rahuljin24-Jun-09 1:39
rahuljin24-Jun-09 1:39 
GeneralRe: socket programming using vc++ Pin
norish24-Jun-09 6:34
norish24-Jun-09 6:34 
GeneralRe: socket programming using vc++ Pin
rahuljin24-Jun-09 20:34
rahuljin24-Jun-09 20:34 
GeneralRe: socket programming using vc++ Pin
norish25-Jun-09 3:04
norish25-Jun-09 3:04 
    serverInfo.sin_addr.s_addr = inet_addr("127.0.0.1");
...
    nret = bind(listeningSocket, (LPSOCKADDR)&serverInfo, sizeof(struct sockaddr));

It is common sennse always succeeds above.
But,
    serverInfo.sin_addr.s_addr = inet_addr("192.168.250.201");
...
    nret = bind(listeningSocket, (LPSOCKADDR)&serverInfo, sizeof(struct sockaddr));

will succeeds only when this server program is executed on the pc which has IP address '192.168.250.201' exactly.
Note that bind() address is not client address but server address. So you cannot choose client by bind() and you should check accept()'ed client address by means.

Another situation, you have some local IP address and global IP address 10.0.0.1 by PPPOE, you may not wait for connection on 10.0.0.1 usually, because 10.0.0.1 address is owned by a router which connecting another network. Then you should wait on your local IP address and make change the router settings, for example DMZ or static routing, which 10.0.0.1 in-bound packets can route to your local IP address. In this case, in fact, it is not a programming issue but the network setting issue.
GeneralRe: socket programming using vc++ Pin
rahuljin26-Jun-09 20:53
rahuljin26-Jun-09 20:53 
GeneralRe: socket programming using vc++ Pin
norish27-Jun-09 18:30
norish27-Jun-09 18:30 
Questionwin32 windows exploler. Pin
birajendu17-Jun-09 0:53
birajendu17-Jun-09 0:53 
AnswerRe: win32 windows exploler. Pin
_AnsHUMAN_ 17-Jun-09 1:29
_AnsHUMAN_ 17-Jun-09 1:29 
QuestionRe: win32 windows exploler. Pin
David Crow17-Jun-09 3:13
David Crow17-Jun-09 3:13 
AnswerRe: win32 windows exploler. Pin
«_Superman_»17-Jun-09 16:39
professional«_Superman_»17-Jun-09 16:39 
GeneralRe: win32 windows exploler. Pin
birajendu17-Jun-09 18:28
birajendu17-Jun-09 18:28 
GeneralRe: win32 windows exploler. Pin
chirag_chauhan17-Jun-09 22:54
chirag_chauhan17-Jun-09 22:54 
GeneralRe: win32 windows exploler. Pin
birajendu18-Jun-09 17:11
birajendu18-Jun-09 17:11 
QuestionMouse rotating knob message Pin
Nikesh Jagtap17-Jun-09 0:42
Nikesh Jagtap17-Jun-09 0:42 
AnswerRe: Mouse rotating knob message Pin
Naveen17-Jun-09 1:18
Naveen17-Jun-09 1:18 
QuestionBatch Build in VS 2005 Pin
Dieter Hammer16-Jun-09 23:43
Dieter Hammer16-Jun-09 23:43 
AnswerRe: Batch Build in VS 2005 Pin
_AnsHUMAN_ 17-Jun-09 1:34
_AnsHUMAN_ 17-Jun-09 1:34 
Question<b>ERROR_TOO_MANY_SECRETS 1381 (0x565) </b> Pin
krish_kumar16-Jun-09 23:41
krish_kumar16-Jun-09 23:41 
QuestionRe: ERROR_TOO_MANY_SECRETS 1381 (0x565) Pin
David Crow17-Jun-09 3:16
David Crow17-Jun-09 3:16 
AnswerRe: ERROR_TOO_MANY_SECRETS 1381 (0x565) Pin
krish_kumar18-Jun-09 19:56
krish_kumar18-Jun-09 19:56 
AnswerRe: ERROR_TOO_MANY_SECRETS 1381 (0x565) Pin
Member 419459317-Jun-09 4:31
Member 419459317-Jun-09 4:31 

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.