Click here to Skip to main content
15,913,758 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unhandled exception at ...... Pin
Shuang. Wu13-Apr-06 20:46
Shuang. Wu13-Apr-06 20:46 
GeneralRe: Unhandled exception at ...... Pin
Stephen Hewitt14-Apr-06 21:31
Stephen Hewitt14-Apr-06 21:31 
AnswerRe: Unhandled exception at ...... Pin
Steve Echols13-Apr-06 20:34
Steve Echols13-Apr-06 20:34 
GeneralRe: Unhandled exception at ...... Pin
pjmvn13-Apr-06 20:49
pjmvn13-Apr-06 20:49 
GeneralRe: Unhandled exception at ...... Pin
Steve Echols13-Apr-06 21:00
Steve Echols13-Apr-06 21:00 
GeneralRe: Unhandled exception at ...... Pin
pjmvn13-Apr-06 21:21
pjmvn13-Apr-06 21:21 
GeneralRe: Unhandled exception at ...... Pin
Steve Echols13-Apr-06 21:27
Steve Echols13-Apr-06 21:27 
QuestionService/Socket/Threads/ Pin
syntaxed13-Apr-06 19:42
syntaxed13-Apr-06 19:42 
im developing a udp based client/service app that requires to be windows service apps.

serverService: a service that sends/recv the data to/from client.
i used WaitforSingleObject as a timer for serverService in a while(1) loop, that signals the event and serverService sends data to the clientService. the loop starts whenever the ServiceMain() is called from the SCM.

clientservice: a service that sends/recv data from server
similarly, i used WaitForSingleObject as a timer for my clientservice app, which sends the data to serverService very well.

but fortunately, both the services are unable to receive anything. even the OnReceive() Event is not getting triggered.

while i run the exact code using a Dialog-based app, both apps(client/server) runs fine and to the desired expectations.

Findings:
Therefore, just recognized after a fairly fine debugging that the neither serverService nor clientService was receiving any thing from each other, altho both services are sending the data.

it seems that, because both the services are in while loop therefore they can only do the tasks called from within the while loop.

Workaround:
so i guess i wud have to start another while(1) loop for both the services... that shud check and read the port for any prospective incoming message.

Results:
well, i did the above mentioned workaround, like while(1) ReceiveFrom(...), but once again, fortunately, it did not work.

Conclusion:
CAsyncSocket requires a message pump. Any ideas where shud i put my message_pump, the loop, so that i may get the exact message for the OnReceive to be called. Any snippets, links, articles?

Anybody has used the sockets in service??? Send() is S_OK, but How to Receive()??

Any ideas for the simple problem?


Best regards,
JT!
QuestionRe: Service/Socket/Threads/ Pin
syntaxed13-Apr-06 23:20
syntaxed13-Apr-06 23:20 
AnswerRe: Service/Socket/Threads/ Pin
Robert M Greene14-Apr-06 9:21
Robert M Greene14-Apr-06 9:21 
QuestionLines Pin
sataoa13-Apr-06 18:56
sataoa13-Apr-06 18:56 
AnswerRe: Lines Pin
Laxman Auti13-Apr-06 19:01
Laxman Auti13-Apr-06 19:01 
GeneralRe: Lines Pin
sataoa13-Apr-06 19:42
sataoa13-Apr-06 19:42 
AnswerRe: Lines Pin
Steve Echols13-Apr-06 21:16
Steve Echols13-Apr-06 21:16 
GeneralRe: Lines Pin
yang__lee3-May-06 1:35
yang__lee3-May-06 1:35 
QuestionComputer Aided Design Pin
sataoa13-Apr-06 18:54
sataoa13-Apr-06 18:54 
AnswerRe: Computer Aided Design Pin
Laxman Auti13-Apr-06 18:57
Laxman Auti13-Apr-06 18:57 
QuestionApplication settings in registry Pin
NancyAsath13-Apr-06 18:46
NancyAsath13-Apr-06 18:46 
AnswerRe: Application settings in registry Pin
Laxman Auti13-Apr-06 18:53
Laxman Auti13-Apr-06 18:53 
QuestionApplication running in debug but crashing in release mode Pin
arunperi13-Apr-06 18:42
arunperi13-Apr-06 18:42 
AnswerRe: Application running in debug but crashing in release mode Pin
Laxman Auti13-Apr-06 18:55
Laxman Auti13-Apr-06 18:55 
GeneralRe: Application running in debug but crashing in release mode Pin
arunperi13-Apr-06 19:24
arunperi13-Apr-06 19:24 
AnswerRe: Application running in debug but crashing in release mode Pin
Le Thanh Cong13-Apr-06 20:52
Le Thanh Cong13-Apr-06 20:52 
AnswerRe: Application running in debug but crashing in release mode Pin
Stephen Hewitt14-Apr-06 21:33
Stephen Hewitt14-Apr-06 21:33 
AnswerRe: Application running in debug but crashing in release mode Pin
super_ttd24-Jun-06 4:41
super_ttd24-Jun-06 4:41 

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.