Click here to Skip to main content
15,921,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: bad and fail of steam Pin
CPallini17-Feb-08 22:13
mveCPallini17-Feb-08 22:13 
GeneralRe: bad and fail of steam Pin
George_George18-Feb-08 1:06
George_George18-Feb-08 1:06 
GeneralVista SDK Build Problem Pin
Akin Ocal17-Feb-08 12:40
Akin Ocal17-Feb-08 12:40 
QuestionEasiest way to change owner on all object's child objects ? Pin
vilius_m17-Feb-08 9:20
vilius_m17-Feb-08 9:20 
Questiongame keyboard simulation Pin
Spleshmen17-Feb-08 8:19
Spleshmen17-Feb-08 8:19 
GeneralRe: game keyboard simulation Pin
Randor 18-Feb-08 8:13
professional Randor 18-Feb-08 8:13 
GeneralRe: game keyboard simulation Pin
Spleshmen19-Feb-08 1:49
Spleshmen19-Feb-08 1:49 
QuestionSimple socks TCP connecting Pin
Johpoke17-Feb-08 4:18
Johpoke17-Feb-08 4:18 
Im (trying) to create a very, very simple TCP client and server which will connect and send a string of data that is 64 characters long. Im using Server Client Sockets[^] and Simple TCP Server[^] I have pretty much copy paste the code, and the actual 64 characters data transfer works fine. But now im moving on to making the client (which connectets to the listeing server) connect again maybe 100 ms later, to update the data. Notice that the cleint is re-doing all of the socks code, the whole WSAstartup, socket init etc. this part can work fine for a few hundred connections, but sometimes, at what seems random intervals the connecting just dies for a while, a few seconds later its back up and going. Im not getting any error, or return, its just like the socket initing freezes for a few seconds, then keeps going. I tried making the connection stay open, so it just revc's but i could not get it to work. (im very new to socks...)

Im guessing windows/socks doesnt like my program rapidly disconnecting and then creating a new connection all the time, because in my firewall/netstat it seems my program has loads of open connections to many other ports (and i only want it to use 23)

<br />
  TCP    thecomp:3172         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3174         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3175         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3176         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3177         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3178         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3179         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3182         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3183         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3185         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3186         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3187         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3190         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3191         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3193         localhost:telnet       CLOSE_WAIT<br />
  TCP    thecomp:3194         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3196         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3197         localhost:telnet       CLOSE_WAIT<br />
  TCP    thecomp:3199         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3200         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3201         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3203         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3204         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3205         localhost:telnet       TIME_WAIT<br />
  TCP    thecomp:3207         localhost:telnet       TIME_WAIT<br />

Any ideas on whats wrong?

I just want a very simple way to transfer approx 64 characters over a LAN, very often. Lowtech is nice, because in the future it is going to be over a WiFi, in which a bad connection can occur, that is why i would like to keep my code to init, connect, disconnect every 100ms. (in which a constant connection may take more time to restart)

If anyone has any idea to other methods of simple data transfer (maybe UDP?) im open to all ideas...

Maybe there is some nice code i can #include in my project which will do the connecting for me?

Thanks!

Unsure | :~

PS. Visual Studio 6.0, MFC Dialog Application

//Johannes

GeneralRe: Simple socks TCP connecting Pin
Moak21-Feb-08 12:11
Moak21-Feb-08 12:11 
GeneralRe: Simple socks TCP connecting Pin
Johpoke22-Feb-08 4:30
Johpoke22-Feb-08 4:30 
GeneralRe: Simple socks TCP connecting Pin
Moak22-Feb-08 4:42
Moak22-Feb-08 4:42 
GeneralRe: Simple socks TCP connecting Pin
Johpoke23-Feb-08 2:37
Johpoke23-Feb-08 2:37 
GeneralRe: Simple socks TCP connecting Pin
Moak26-Feb-08 0:08
Moak26-Feb-08 0:08 
GeneralRe: Simple socks TCP connecting Pin
Johpoke29-Feb-08 21:55
Johpoke29-Feb-08 21:55 
GeneralRe: Simple socks TCP connecting Pin
Moak29-Feb-08 22:52
Moak29-Feb-08 22:52 
QuestionRe: Simple socks TCP connecting Pin
Moak23-Feb-08 3:01
Moak23-Feb-08 3:01 
GeneralRe: Simple socks TCP connecting Pin
Johpoke23-Feb-08 3:06
Johpoke23-Feb-08 3:06 
GeneralRe: Simple socks TCP connecting Pin
Moak26-Feb-08 0:34
Moak26-Feb-08 0:34 
Questionproblems with cap and vfw Pin
cmos17-Feb-08 4:09
cmos17-Feb-08 4:09 
QuestionRe: problems with cap and vfw Pin
cmos17-Feb-08 5:02
cmos17-Feb-08 5:02 
GeneralRe: problems with cap and vfw Pin
Mark Salsbery17-Feb-08 9:46
Mark Salsbery17-Feb-08 9:46 
AnswerRe: problems with cap and vfw Pin
cmos17-Feb-08 10:07
cmos17-Feb-08 10:07 
GeneralRe: problems with cap and vfw Pin
Mark Salsbery17-Feb-08 10:21
Mark Salsbery17-Feb-08 10:21 
GeneralRe: problems with cap and vfw Pin
cmos17-Feb-08 10:59
cmos17-Feb-08 10:59 
GeneralRe: problems with cap and vfw Pin
Mark Salsbery17-Feb-08 13:06
Mark Salsbery17-Feb-08 13:06 

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.