Click here to Skip to main content
16,006,424 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeRe: byjos Pin
Laxman Auti17-May-06 3:48
Laxman Auti17-May-06 3:48 
AnswerRe: byjos Pin
Nibu babu thomas17-May-06 19:48
Nibu babu thomas17-May-06 19:48 
QuestionCTreeCtrl with different colors? Pin
bosfan17-May-06 3:27
bosfan17-May-06 3:27 
AnswerRe: CTreeCtrl with different colors? Pin
Sarath C17-May-06 3:46
Sarath C17-May-06 3:46 
GeneralRe: CTreeCtrl with different colors? Pin
bosfan17-May-06 4:39
bosfan17-May-06 4:39 
AnswerRe: CTreeCtrl with different colors? Pin
Hamid_RT17-May-06 6:26
Hamid_RT17-May-06 6:26 
AnswerRe: CTreeCtrl with different colors? Pin
bosfan22-May-06 4:41
bosfan22-May-06 4:41 
QuestionSockets advice Pin
Demian Panello17-May-06 3:19
Demian Panello17-May-06 3:19 
Hi everybody.

I'm writing an aplication that use sockets, in fact there are 2 apps, a server side and a client side.
Well, I'm new in sockets programming, anyway, I started to write the app. and it does what I want but
I don't like very much and there are some issues.
This what I'm trying to do:
The server side, a Win32 App, without UI, start a thread that have an infinite while with a switch
checking the state of a variable called "State":

switch(State)
{
case 1:
// wait for a connection

case 2:
// close socket

case 3:

// special state
}

The thread after a client connection change the state to 3, where should start to send to client the names of the files in the
PC where it runs, (using CFileFind). Meanwhile the client create a text file to save that info.

Well, I have write both applications, and it works, but with some issues, and this is why I'm here.

My questions:
- Is this logic correct for programming sockets?´(I mean is it well thinking??)D'Oh! | :doh:
- How you would do a programm like that?

I need some advice.OMG | :OMG: WTF | :WTF:

Thankx folks.

Demian.

"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my telephone."

-Bjarne Stroustrup, computer science professor, designer of C++
programming language (1950- )
AnswerRe: Sockets advice Pin
Laxman Auti17-May-06 3:45
Laxman Auti17-May-06 3:45 
AnswerRe: Sockets advice Pin
Sarath C17-May-06 3:52
Sarath C17-May-06 3:52 
GeneralRe: Sockets advice Pin
Demian Panello17-May-06 4:31
Demian Panello17-May-06 4:31 
QuestionHow can I get the IP address of my Server Pin
zahid_ash17-May-06 3:10
zahid_ash17-May-06 3:10 
QuestionRe: How can I get the IP address of my Server Pin
David Crow17-May-06 3:14
David Crow17-May-06 3:14 
AnswerRe: How can I get the IP address of my Server Pin
zahid_ash17-May-06 3:21
zahid_ash17-May-06 3:21 
GeneralRe: How can I get the IP address of my Server Pin
David Crow17-May-06 3:40
David Crow17-May-06 3:40 
AnswerRe: How can I get the IP address of my Server Pin
Ganesh_T17-May-06 3:16
Ganesh_T17-May-06 3:16 
AnswerRe: How can I get the IP address of my Server Pin
Laxman Auti17-May-06 3:17
Laxman Auti17-May-06 3:17 
Generalwould it work for internet? Pin
zahid_ash17-May-06 3:36
zahid_ash17-May-06 3:36 
GeneralRe: would it work for internet? Pin
David Crow17-May-06 3:42
David Crow17-May-06 3:42 
GeneralRe: would it work for internet? Pin
Laxman Auti17-May-06 3:53
Laxman Auti17-May-06 3:53 
AnswerRe: How can I get the IP address of my Server Pin
Peter Weyzen17-May-06 16:14
Peter Weyzen17-May-06 16:14 
QuestionMonitor List control auto-scroll down Pin
Immunity1817-May-06 2:26
Immunity1817-May-06 2:26 
QuestionHide the MFC application in Task Manager Pin
zahid_ash17-May-06 2:07
zahid_ash17-May-06 2:07 
AnswerRe: Hide the MFC application in Task Manager Pin
Hamid_RT17-May-06 2:13
Hamid_RT17-May-06 2:13 
GeneralRe: Hide the MFC application in Task Manager Pin
zahid_ash17-May-06 2:24
zahid_ash17-May-06 2:24 

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.