Jump to content

Recommended Posts

Guest bretto
Posted

Hi All

Can anyone shed some light on something thats been happening.

Ive written a small tcp/ip client in mfc.

It simply starts winsock, connects to a server and port, then needs to send 3 commands in order. The server processes each command and sends a reply in the same sequence.

Everything works perfectly up until I try to send the 2nd command. At this point the app tells me its send the entire command but I never receive anything back from the server.

I connect and return the info from the server via ::onreceive of the ccesocket.

Then I try to run the next commands in sequence. The sequence and timing of the sends are controlled from within the ::onreceive.

ie connect->recv->send 1->recv->send 2->nothing

I am getting the same happening when I use non-mfc also and just send and wait to recv

I downloaded a sample app (non-mfc) that allows you to send commands by typing in the command and pressing send and I can only send 1 command on that also so its not a timing thing.

Im using activesync passthru to the internet not sure if that is doing something funny.

Its not on the server end as I can telnet over and manually type in each command and receive the desired responses.

Just appears to not be happy after each first send/recv. Any info would be appreciated. thanks

Guest mr_end
Posted

I am unsure what would cause something like this as I only program in windows. But maybe there is a way around it by sending a string with all commands in and parsing it at the server end??

e.g.

send this string command1::command2::command3

and separate the commands at the server end using a combination of mid and instr statements (or the equivalent)

Guest bretto
Posted
I am unsure what would cause something like this as I only program in windows.  But maybe there is a way around it by sending a string with all commands in and parsing it at the server end??

e.g.

send this string command1::command2::command3

and separate the commands at the server end using a combination of mid and instr statements (or the equivalent)

<{POST_SNAPBACK}>

I would love to be able to but I have no control over the server. Its a standard server using industry standards and commands. Got to send username->get response->send password->get response->etc

I just downgraded from wm2003se to wm2003 official release and still get the same result. Thought it might be the hacked os I was using but alas its not.

Its a snap under windows but for some godforesaken reason everything is only half included in windows mobile so there is always a learning curve required.

Guest bretto
Posted

Tried it every way I can think of. mfc, non-mfc, different classes, using threads, not using threads, wm2003, wm2003se and I still get the same result.

No response from the second send to a socket. It must be something I'm doing.

Guest bretto
Posted
Tried it every way I can think of. mfc, non-mfc, different classes, using threads, not using threads, wm2003, wm2003se and I still get the same result.

No response from the second send to a socket. It must be something I'm doing.

<{POST_SNAPBACK}>

Resolved. (lots of hair missing tho)

thanks

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.