Sponsored Content
Full Discussion: read function
Top Forums UNIX for Dummies Questions & Answers read function Post 19419 by rajashekaran on Thursday 11th of April 2002 06:55:52 AM
Old 04-11-2002
read function

Hello all
In UNIX i wrote a program which simply establishes a conncetion with another system, using write system call i wrote a message to the server from client and from the server i send another message, for the second time i send a mesage using write system call to the server, when i send a message from the server using write system call for the second time iam not able to read in the client , the client waits in an infinite loop. what is the problem in using repeated read or write calls subsequently
plz explain my doubt
 

10 More Discussions You Might Find Interesting

1. Programming

read a file wich fscanf() in a function

I use fopen, fscanf, fclose to read a file. It can work well. since many files should be read, a function is created with the same code. But in the function, fscanf can not work well. for example, the first line of the the file is: > filename but the fscanf will give: 207/23/eee/34 it appears... (2 Replies)
Discussion started by: cdbug
2 Replies

2. Programming

Cannot read a file with read(fd, buffer, buffersize) function

# include <stdio.h> # include <fcntl.h> # include <stdlib.h> # include <sys/stat.h> int main(int argc, char *argv) { int fRead, fPadded, padVal; int btRead; int BUFFSIZE = 512; char buff; if (argc != 4) { printf ("Please provide all of the... (3 Replies)
Discussion started by: naranja18she
3 Replies

3. Shell Programming and Scripting

read statement not working in a function

Pls this is emergency.I have written a script which is taking input from another script. and the contents of my second script are acting as functions to my main script.Now the problem is that in one of the functions i want the script ececution to stop and start when user enters any character r... (2 Replies)
Discussion started by: sumitdua
2 Replies

4. UNIX for Dummies Questions & Answers

Can we read in variable into function in Unix?

can u read variables into function in unix like java or c++ eg sum($1) { if echo "$1 is equal to yes" else echo "$1 not equal to yes" } and if so what r the rulz to using function in unix for using functions thanks in advance :confused: (1 Reply)
Discussion started by: ShinTec
1 Replies

5. UNIX for Dummies Questions & Answers

Can you read in variable into function in Unix?

can you read variables into function in unix like java or c++ eg sum($1) { if echo "$1 is equal to yes" else echo "$1 not equal to yes" } and if so what are the rules to reading variables into function in unix thanks in advance for your answer (2 Replies)
Discussion started by: ShinTec
2 Replies

6. Shell Programming and Scripting

Help with grep and read function in a BASH Script

I'm putting together a script that will search my mail archives for emails that meet certain criteria and output the files to a text file. I can manually cat that text file and pipe it into sendmail and it will work (i.e. cat /pathtofile/foo.txt | sendmail -t me@company.com) My script sends... (7 Replies)
Discussion started by: binary-ninja
7 Replies

7. Shell Programming and Scripting

bash read within function with arguments

I have trouble getting this logic to work #!/bin/bash function assign_var(){ while do read -p "$2 :" $3 done } assign_var '$IPADDRESS' ipaddress IPADDRESS Basicly, i want to make sure that entry is made (i can add more sophisticated checks later), but the idea is to recycle... (11 Replies)
Discussion started by: serverchief
11 Replies

8. UNIX Desktop Questions & Answers

AIX how to read the file in function again and again

dear friends I have a wrote a shell script which works like this. 1.) a command is executed and the log is moved in the file. 2.) this file is copied in to the other file. 3.) used a grep command to find a particular word. 4.) if a particular word is there then the script will go to next... (4 Replies)
Discussion started by: aboy212u
4 Replies

9. Shell Programming and Scripting

[Bash] Read History function & Read Arrowkeys

Hi. How can I create a history function? (By "read" command or so) & How can I configure a read command so that the arrow keys are not displayed so funny? (^[[A) Thanks in advance. (4 Replies)
Discussion started by: sinnlosername
4 Replies

10. Shell Programming and Scripting

While read won't run keyboard function

I am using while read do/ done to retrieve menu item. Works as advertised, no problem. I am using this hack function "pause" to stop script execution and wait for keyboard "enter" key to continue. Sort of break point function. Also works fine with one exception - it does not work when used... (4 Replies)
Discussion started by: annacreek
4 Replies
Net::Proxy::Connector::dual(3pm)			User Contributed Perl Documentation			  Net::Proxy::Connector::dual(3pm)

NAME
Net::Proxy::Connector::dual - Y-shaped Net::Proxy connector DESCRIPTION
"Net::Proxy::Connecter::dual" is a "Net::Proxy::Connector" that can forward the connection to two distinct services, based on the client connection, before any data is exchanged. CONNECTOR OPTIONS
This connector can only work as an "in" connector. The "server_first" and "client_first" options are required: they are hashrefs containing the options necessary to create two "out" "Net::Proxy::Connector" objects that will be used to connect to the requested service. The "Net::Proxy::Connector::dual" object decides between the two services by waiting during a short timeout. If the client sends some data directly, then it is connected via the "client_first" connector. Otherwise, at the end of the timeout, it is connected via the "server_first" connector. o host The hostname on which the connector will listen for client connections. Default is "localhost". o port The port on which the connector will listen for client connections. o server_first Typically an "out" connector to a SSH server or any service that sends a banner line. o client_first Typically an "out" connectrot to a web server or SSL server. o timeout The timeout in seconds (can be decimal) to make a decision. Default is 1 second. AUTHOR
Philippe 'BooK' Bruhat, "<book@cpan.org>". ACKNOWLEDGMENTS
This module is based on a script named sslh, which I wrote with Frederic Ple "<sslh@wattoo.org>" (who had the original insight about the fact that not all servers speak first on the wire). Frederic wrote a C program, while I wrote a Perl script (based on my experience with connect-tunnel). Now that "Net::Proxy" is available, I've ported the Perl script to use it. COPYRIGHT
Copyright 2006 Philippe 'BooK' Bruhat, All Rights Reserved. LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2009-10-18 Net::Proxy::Connector::dual(3pm)
All times are GMT -4. The time now is 04:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy