socket programming problem
Hello!
I made a class which should handle tcp comunication over a network between 2 apps. If I use this class to send data (at greater intervals of time) it works just fine. If I try to send a file's content(line by line) over the network the receiving application( which uses the same class for receiveing) seems to get only the first data message from the other end. I tried waiting before transmission with select( n, NULL, &writefdset, NULL, &tv ) in a loop and before receive with select(n, &readfdset, NULL, NULL, &tv) in a loop but it doesn't seem to work. For sending data I use send() and for receiving recv(). If you have any ideeas please help me! |
I don't know send() and recv() but it sounds like a "one-message-function".
Maybe it helps if you use the more general way of transmitting data through a socket with read() and write(). Simple example (from Wrox' "Beginning Linux programming"). The client side: Code:
#include <sys/types.h> Code:
#include <sys/types.h> |
hai Bgraur
I hope hko answered your problem . I am very much interested in socket programming in linux.I hope we an contact each other for any doubts hereafter........ bye.. |
All times are GMT -5. The time now is 11:12 PM. |