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.
the client prints 5555555555555555555555555555555555555.....so its sending the chunks of data....but in recievefile recv return -1,so its not working.....anyone knows what am i doing wrong ? thank you
Check the value of "errno" after the failed call to "recv" and print the error string using "strerror". You will have to include "errno.h" and "string.h".
i am getting this : Transport endpoint is not connected...........
Try searching the error message "Transport endpoint is not connected" on Google. I did the same (for you) and found that many people have faced this before !! You can have a look at their situations and may be you'll get a hint !
i did that already...but i still don't have a clue what to do..i didnt find nothing related to my program...some people just used a command in the terminal but they were using solaris or something,i use fedora,and it seems it didnt work for me
i did that already...but i still don't have a clue what to do..i didnt find nothing related to my program...some people just used a command in the terminal but they were using solaris or something,i use fedora,and it seems it didnt work for me
U mean that command didn't execute on your system or it didn't have the effect after execution ?
i didnt execute on my sistem...but i found a similar thread here with this error and someone said :
The problem is the wait = yes option. For TCP connections xinetd seems to try and pass sockets around, instead of starting the server and redirecting STDIN/STDOUT.
Set wait = no for TCP streams. This is what I did to fix this exact same problem I was having. Below is my final configuration in /etc/xinetd.d/myservice:
but in /etc/xinetd i dont have myservice to change that....
# default: on
# description: vBx client server program
service vbxsock
{
port = 4196
socket_type = stream
wait = no
user = vBx
server = /home/vBx/workspace/server/src/server.cpp
log_on_success += USERID
log_on_failure += USERID
disable = no
}
i changed the root from "vBx" to "root" still not working,and the port is not used in /etc/services ..what did i do wrong ?
i solved that error....in main() i was using the old socket to receive the file instead of the new one from accept() function,stupid me...thanx for the replies
i solved that error....in main() i was using the old socket to receive the file instead of the new one from accept() function,stupid me...thanx for the replies
It is good something worked for you !
Could you now post the working code here for other newbie's to see if they face the same problem ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.