recv unable to receive first to characters. REALLY head ditching!!!!!!
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have to communicte with windows in which client is running. the problem is - sometime the first two characters of xml message is are not receiving. pls suggest except using "MSG_WAITALL" flag.
I raised this question many tiomes, but i dint get good answer.. this is the problem from 3 months. I hope this time I will get the ans.
OS:red flag
language: "C"
I wrote a socket server program, in which receive function is like this..
I have to communicte with windows in which client is running. the problem is - sometime the first two characters of xml message is are not receiving. pls suggest except using "MSG_WAITALL" flag.
I raised this question many tiomes, but i dint get good answer.. this is the problem from 3 months. I hope this time I will get the ans.
Thankx in Advance
Well, you got answers in your other threads about this same issue, but never said if they worked or not. And you have one solution, which you mention, but say you don't want it.
Don't know what else to suggest....except for you to spell out your words, and write/spell clearly.
Your original code is indicating that you want to receive 6 bytes, and store them into a 4-byte entity. Silly mistakes like this are the reason that hard-coded constants are shunned in programming.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.