Click here to Skip to main content
15,896,359 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalencryption in windows mobile [modified] Pin
guru moorthy.k14-Feb-08 18:51
guru moorthy.k14-Feb-08 18:51 
GeneralRe: encryption in windows mobile Pin
Rajesh R Subramanian14-Feb-08 20:27
professionalRajesh R Subramanian14-Feb-08 20:27 
QuestionThreads not working in network Pin
Wamuti14-Feb-08 18:22
Wamuti14-Feb-08 18:22 
GeneralRe: Threads not working in network Pin
Rajkumar R14-Feb-08 19:08
Rajkumar R14-Feb-08 19:08 
QuestionRe: Threads not working in network Pin
Wamuti14-Feb-08 19:52
Wamuti14-Feb-08 19:52 
GeneralRe: Threads not working in network Pin
Mark Salsbery15-Feb-08 6:49
Mark Salsbery15-Feb-08 6:49 
GeneralRe: Threads not working in network Pin
Wamuti17-Feb-08 20:07
Wamuti17-Feb-08 20:07 
GeneralRe: Threads not working in network Pin
Mark Salsbery18-Feb-08 6:19
Mark Salsbery18-Feb-08 6:19 
To use sockets in a single threaded application, you can use the
WSAAsyncSelect() function.  This will cause messages to be sent
to a specified window when the socket events you select occur - particularly
useful for when an incoming connection request is received, when there's
data available to be read on a socket, and when a connection is closed.

The advantage of multiple threads is the same advantage as any multithread
application - the app can take advantage of multiple processors for better  performance
with parallel processing.

I didn't mean to be harsh at all - just honest.  Take the time to learn at least the very
basics of sockets and things will work much better for you in the long run - I know this from
experience Smile | :)

Some basic things to know inside and out -
1) The essential socket APIs (study these in the Winsock SDK):
   socket()
   bind()
   listen()
   accept()
   connect()
   WSAAsyncSelect() (or WSAEventSelect() to use asynchronous socket ops on a separate thread)
   recv()
   send()
   shutdown()
   closesocket()
2) A basic understanding of blocking (synchronous) and non-blocking (asynchronous)
  socket modes, and how the mode is changed on a socket.

I wish I had some links but I don't.  There's a few great articles here at Code Project
but the search isn't bringing them up at the moment grrr. 

Mark




Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Threads not working in network Pin
Wamuti18-Feb-08 19:23
Wamuti18-Feb-08 19:23 
Generalcom Pin
tarak Desai14-Feb-08 17:56
tarak Desai14-Feb-08 17:56 
GeneralRe: com Pin
Wamuti14-Feb-08 18:37
Wamuti14-Feb-08 18:37 
AnswerRe: com Pin
Wamuti14-Feb-08 18:43
Wamuti14-Feb-08 18:43 
GeneralRe: com Pin
ThatsAlok14-Feb-08 22:25
ThatsAlok14-Feb-08 22:25 
GeneralAlignment of Variables Whitin structure Pin
ForNow14-Feb-08 17:53
ForNow14-Feb-08 17:53 
GeneralRe: Alignment of Variables Whitin structure Pin
Maxwell Chen14-Feb-08 18:11
Maxwell Chen14-Feb-08 18:11 
GeneralRe: Alignment of Variables Whitin structure Pin
ForNow14-Feb-08 22:05
ForNow14-Feb-08 22:05 
GeneralRe: Alignment of Variables Whitin structure Pin
Iain Clarke, Warrior Programmer14-Feb-08 22:28
Iain Clarke, Warrior Programmer14-Feb-08 22:28 
GeneralRe: Alignment of Variables Whitin structure Pin
ForNow15-Feb-08 0:01
ForNow15-Feb-08 0:01 
GeneralHelp with OOP Pin
Lord Kixdemp14-Feb-08 17:22
Lord Kixdemp14-Feb-08 17:22 
GeneralRe: Help with OOP [modified] Pin
Rajkumar R14-Feb-08 17:34
Rajkumar R14-Feb-08 17:34 
GeneralRe: Help with OOP Pin
Lord Kixdemp14-Feb-08 17:38
Lord Kixdemp14-Feb-08 17:38 
GeneralRe: Help with OOP Pin
Rajesh R Subramanian14-Feb-08 20:30
professionalRajesh R Subramanian14-Feb-08 20:30 
GeneralRe: Help with OOP Pin
Rajkumar R14-Feb-08 22:12
Rajkumar R14-Feb-08 22:12 
GeneralRe: Help with OOP Pin
David Crow15-Feb-08 3:37
David Crow15-Feb-08 3:37 
QuestionHow to send Shift/Ctrl/Alt + key to background window Pin
njhy14-Feb-08 12:11
njhy14-Feb-08 12:11 

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.