Search Results

Search: Posts Made By: Shang
Forum: Programming 06-24-2011
10,049
Posted By Shang
Actually, I think TEMP_FAILURE_RETRY does it for...
Actually, I think TEMP_FAILURE_RETRY does it for me.
Still, I am stuck. I tried few small modifications and still I get SIGPIPE only during second communication trial.
Timeout on select does not...
Forum: Programming 06-24-2011
10,049
Posted By Shang
I understand. So how to discover server breakdown...
I understand. So how to discover server breakdown on the first request sending?
Forum: Programming 06-24-2011
10,049
Posted By Shang
Yes! That's it. The problem was that there...
Yes! That's it. The problem was that there appeared SIGPIPE during second communicate() invocation. It was killing the program (SIGPIPE default action is to terminate process).
But there is still...
Forum: Programming 06-24-2011
10,049
Posted By Shang
Getting rid of ERR does not help, because this if...
Getting rid of ERR does not help, because this if ((send...) < 0) condition is never fulfilled. It looks like send() kills program. It sounds crazy.
I have put my whole code on github:...
Forum: Programming 06-23-2011
10,049
Posted By Shang
I put some info printing to my code in order to...
I put some info printing to my code in order to examine where function execution breaks. Now it lookes like that:/***
* Sends request through socket
* Returns:
* 0 success
* ...
Forum: Programming 06-22-2011
10,049
Posted By Shang
ERR() already does it. #define ERR(source)...
ERR() already does it.
#define ERR(source) (fprintf(stderr,"%s:%d\n",__FILE__,__LINE__),\
perror(source),kill(0,SIGKILL),\
exit(EXIT_FAILURE))It is...
Forum: Programming 06-22-2011
10,049
Posted By Shang
I have tried <=, does not help. I have also...
I have tried <=, does not help.
I have also tried removing TEMP_FAILURE_RETRY, nothing changes.
More strange is fact, that when I execute this first time on the client side (of course during server...
Forum: Programming 06-22-2011
10,049
Posted By Shang
I have already written a function which aim is to...
I have already written a function which aim is to send some data (request) and then receive some data (response) from the server.
int send_request(int socket, request_s *request) {
char...
Forum: Programming 06-20-2011
2,315
Posted By Shang
Board is char board[BOARD_SIZE][BOARD_SIZE]; As...
Board is char board[BOARD_SIZE][BOARD_SIZE];
As Corona688 said, it is already passed as reference in my case. I should have checked this more carefully before posting.

Thank you for your help :)
Forum: Programming 06-19-2011
2,315
Posted By Shang
Passing two dimensional array to a function
Hi.
I have a problem with passing two dimensional array to a function.

First, let me show my code to explain what i am going to do:
I have function:void initialize_board(char...
Forum: Programming 06-18-2011
10,049
Posted By Shang
TCP connection check
Hi.
I am writing client - server application using TCP sockets.
I need some very basic functionality, namely: how to check if another "participant" of the connection is still present?
I want to...
Forum: Programming 06-07-2011
4,221
Posted By Shang
I read on stackoverflow.com that it is more...
I read on stackoverflow.com that it is more portable. I have no particular must, just curiosity, I am also reading about POSIX ones.Oh, I haven't noticed that fact. Good to know.Ok, I will remember...
Forum: Programming 06-07-2011
4,221
Posted By Shang
Thanks! Now I think that would give me some...
Thanks! Now I think that would give me some kickoff. I'll be back if any question arises.

---------- Post updated 07-06-11 at 08:41 PM ---------- Previous update was 06-06-11 at 09:06 PM...
Forum: Programming 06-06-2011
4,221
Posted By Shang
You are right, I have not told too much. First...
You are right, I have not told too much.
First I would like to say that this is only my startup program, which may or may not grow into something more clever ;) I am familiar with object oriented...
Forum: Programming 06-06-2011
4,221
Posted By Shang
Two player game, forking & sockets
Hi.
I am just making first steps in Linux POSIX programming. I have read some tutorials on processes, signals and sockets (thanks Beej!), so some basic knowledge I have already got.
I want to write...
Showing results 1 to 15 of 15

 
All times are GMT -4. The time now is 07:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy