Sponsored Content
Full Discussion: recv() not workin fine.....
Special Forums IP Networking recv() not workin fine..... Post 87274 by Perderabo on Friday 21st of October 2005 04:43:50 PM
Old 10-21-2005
char *b;
reseves space a a pointer to a string. No space is reserved for the string itself. You need to use something like:
char b[30];
Now you have space for a 29 character string and a terminating null.
 

10 More Discussions You Might Find Interesting

1. Programming

recv() problems using AIX 4.33

I am opening a server socket on one of our machines and connection to it on the other machine. After making the connection if ether one of the systems does a recv() and ther is no data to receive then the buffer is filled with spaces and returns. I have no way of knowing if it is valid or not. ... (1 Reply)
Discussion started by: hazard0007
1 Replies

2. Programming

C Network Programming - recv() help

So I'm making a program that gets the IP Address of an inputed website, then sends the IP Address to an inputed host. This program has no real meaning, but just a learning experiment. So I sucessfully made the program, then I wanted to try out recv(), and it produces some weird output; here is the... (2 Replies)
Discussion started by: Octal
2 Replies

3. Shell Programming and Scripting

rsh within awk is not workin

cat input.sh | awk ' { cur1=tolower($1) cur2=tolower($2) rsh $cur1 report | grep $cur2 } ' hi, Have a look at the above code, the input.txt file contains two words in each line with space as delimiter, the first word is computer name and the 2nd word is file... (2 Replies)
Discussion started by: geeko
2 Replies

4. Shell Programming and Scripting

why is it workin for 1 file , but not for multiple files?

Hi , this peice of code is working for one file but not for multiple files. Can some one please tell me the reason??? for i in `ls -1 | egrep ''SOM.*` ; do filename=$(ls -1 $i) filename=$(print $filename) if ] then print "Skipping file $i since it already has... (1 Reply)
Discussion started by: somanath Patrud
1 Replies

5. Shell Programming and Scripting

determine the periodfor which user is workin

write a shell script that determines the period for which a specified user is workin on the system. (3 Replies)
Discussion started by: shawz
3 Replies

6. Programming

ABOUT RECV() SYSTEM CALL (regarding timer)

Hi all, I am facing a problem in recv() system call i.e.. in my project i have to implement timer for sending (data) and resending purpose when there is no acknowledgement. is there any way that recv() sys call has its own timer i.e., for ex: recv() has to wait for 10 secs. if any... (0 Replies)
Discussion started by: Rohil
0 Replies

7. Programming

Recv() call with timer(time out )

Hi all, I am facing a problem in recv() system call i.e.. in my project i have to implement timer for sending (data) and resending purpose when there is no acknowledgement. is there any way that recv() sys call has its own timer i.e., for ex: recv() has to wait for 10 secs. if any one knows... (2 Replies)
Discussion started by: Rohil
2 Replies

8. IP Networking

regarding recv function

hi, the syntax of recv function is: int recv( int sockfd, void *buffer, int length, unsigned int flags); Suppose i declared a buffer of size 100 ,then length to be specified in recv function is sizeof(buffer) or sizeof(buffer)-1 ( i.e 100 or 99) thanks in advance (2 Replies)
Discussion started by: kavitha rao
2 Replies

9. Programming

How can I tell when recv is finished with pending data?

I'm working with recv and I am having a heck of a lot of trouble ignoring excess data that I did not ask for. I was hoping someone could shine some light on the subject for me because I'm not getting anywhere fast. ---------- Post updated at 02:46 AM ---------- Previous update was at 12:31 AM... (2 Replies)
Discussion started by: Errigour
2 Replies

10. Shell Programming and Scripting

Bash regex evaluation not workin

I'm building a script that may received start and end date as parameters. I whant to make it as flexible as possible so I'm accepting epoch and date in a way that "date --date=" command may accept. In order to know if parameter provided is an epoc or a "date --date=" string I evaluate if the value... (2 Replies)
Discussion started by: lramirev
2 Replies
STRCHR(3)						   BSD Library Functions Manual 						 STRCHR(3)

NAME
strchr, strrchr, strchrnul -- locate character in string LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <string.h> char * strchr(const char *s, int c); char * strrchr(const char *s, int c); char * strchrnul(const char *s, int c); DESCRIPTION
The strchr() function locates the first occurrence of c (converted to a char) in the string pointed to by s. The terminating null character is considered part of the string; therefore if c is '', the functions locate the terminating ''. The strrchr() function is identical to strchr() except it locates the last occurrence of c. The strchrnul() function is identical to strchr() except that if c is not found in s a pointer to the terminating '' is returned. RETURN VALUES
The functions strchr() and strrchr() return a pointer to the located character, or NULL if the character does not appear in the string. strchrnul() returns a pointer to the terminating '' if the character does not appear in the string. SEE ALSO
memchr(3), memmem(3), strcspn(3), strpbrk(3), strsep(3), strspn(3), strstr(3), strtok(3), wcschr(3) STANDARDS
The functions strchr() and strrchr() conform to ISO/IEC 9899:1990 (``ISO C90''). The strchrnul() is a GNU extension . History The strchrnul() function first appeared in glibc 2.1.1 and was added in FreeBSD 10.0. BSD
February 13, 2013 BSD
All times are GMT -4. The time now is 11:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy