Click here to Skip to main content
15,910,277 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalget the ip address Pin
summo15-Jan-03 2:47
summo15-Jan-03 2:47 
GeneralRe: get the ip address Pin
AlexO15-Jan-03 3:05
AlexO15-Jan-03 3:05 
GeneralRe: get the ip address Pin
summo15-Jan-03 3:26
summo15-Jan-03 3:26 
GeneralRe: get the ip address Pin
AlexO15-Jan-03 4:24
AlexO15-Jan-03 4:24 
GeneralRe: get the ip address Pin
summo15-Jan-03 19:24
summo15-Jan-03 19:24 
GeneralRe: get the ip address Pin
geo_m15-Jan-03 8:15
geo_m15-Jan-03 8:15 
GeneralRe: get the ip address Pin
summo15-Jan-03 19:26
summo15-Jan-03 19:26 
GeneralRe: get the ip address Pin
geo_m15-Jan-03 21:19
geo_m15-Jan-03 21:19 
Don't know if this is exact solution for your problem - problem is that in TCP/IP the numbers are in network byte order - this is OK for some big machines, but for Intel you have to switch the order (this is the Little/Big endian problem).

so the code should looks like:
<br />
getpeername( ClientSock, (sockaddr*)&accept_sin, (int*)&accept_sin_len);<br />
<br />
short port = ntohs( accept_sin.sin_port );<br />
...<br />

the same will be later on for the address...
GeneralVersion number Pin
pranavamhari15-Jan-03 2:21
pranavamhari15-Jan-03 2:21 
GeneralRe: Version number Pin
Nitron15-Jan-03 3:44
Nitron15-Jan-03 3:44 
GeneralMany methods to redraw a window - Invalidate, RedrawWindow, ... Pin
Daniel Strigl15-Jan-03 2:15
Daniel Strigl15-Jan-03 2:15 
GeneralRe: Many methods to redraw a window - Invalidate, RedrawWindow, ... Pin
includeh1015-Jan-03 3:11
includeh1015-Jan-03 3:11 
GeneralSupported paper sizes Pin
fredericthomas15-Jan-03 1:01
professionalfredericthomas15-Jan-03 1:01 
GeneralTransferring files via Direct Cable Connect Pin
Still learning how to code15-Jan-03 0:30
Still learning how to code15-Jan-03 0:30 
GeneralRe: Transferring files via Direct Cable Connect Pin
Mike Nordell15-Jan-03 23:02
Mike Nordell15-Jan-03 23:02 
GeneralRe: Transferring files via Direct Cable Connect Pin
Still learning how to code16-Jan-03 2:42
Still learning how to code16-Jan-03 2:42 
GeneralRe: Transferring files via Direct Cable Connect Pin
Mike Nordell16-Jan-03 8:32
Mike Nordell16-Jan-03 8:32 
GeneralRe: Transferring files via Direct Cable Connect Pin
Still learning how to code16-Jan-03 21:40
Still learning how to code16-Jan-03 21:40 
Questionautomatic registering DLL??? Pin
xxhimanshu15-Jan-03 0:11
xxhimanshu15-Jan-03 0:11 
AnswerRe: automatic registering DLL??? Pin
jmkhael15-Jan-03 1:15
jmkhael15-Jan-03 1:15 
GeneralRe: automatic registering DLL??? Pin
xxhimanshu15-Jan-03 1:24
xxhimanshu15-Jan-03 1:24 
GeneralRe: automatic registering DLL??? Pin
AlexO15-Jan-03 2:43
AlexO15-Jan-03 2:43 
GeneralRe: automatic registering DLL??? Pin
Alvaro Mendez15-Jan-03 5:11
Alvaro Mendez15-Jan-03 5:11 
Generaladd-ins in c++ using the DTE-object Pin
schaereran@gmx.net14-Jan-03 23:54
schaereran@gmx.net14-Jan-03 23:54 
GeneralRe: add-ins in c++ using the DTE-object Pin
xxhimanshu15-Jan-03 0:09
xxhimanshu15-Jan-03 0:09 

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.