Sponsored Content
Top Forums Programming connect() parameters or maybe something else. Post 21356 by Nivla on Wednesday 15th of May 2002 12:25:45 PM
Old 05-15-2002
Question connect() parameters or maybe something else.

I'm having trouble when running a program that uses the connect(). I keep receiving errno: 22. Below is the code that I am using.

Do I have the variables set up correctly?

Am I passing the correct parameters?

I have been searching for source code on the connect function but haven't found any. IF you know of some posted on the net I would really appreciate it.

-------------------------------------------------------------------------
int read_sold(char rxfile[], char message[])
{
int i, rc, s;
char hostname[64];
char readbuff[MAXREAD];
struct sockaddr_in sin;
struct sockaddr const fin;

memset(readbuff, 0, MAXREAD);
/*
*** Get TCP address and socket
*/
for (i = 0; i < 3; i++){
if (tcpaddress(&s, POSTORXPORT, &sin, (sizeof(sin)), message) == 0)
break;
if (i == 2) return -1;
}

/*
*** Try to connect to the address
*/
for (i = 0; i < 3; i++) {
if (connect(s, &fin, sizeof(fin)) < 0) {
if (i == 2) {
sprintf(message, "Client CONNECT failed: errno = %d",
errno);

-------------------------------------------------------------------------
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need Parameters Help.

I can test for one parameter but anything more then that and I get an Error. I forgot I run this batch in a shell #!/bin/sh ------------------------------------------------------------------------- Write a batch program that accepts a keyword as a parameter and finds all the files... (3 Replies)
Discussion started by: james2006
3 Replies

2. Shell Programming and Scripting

parameters

I have a script that needs to check if the given parameters are a combination of 0123456789 and not a word or another irelevant character.please help (6 Replies)
Discussion started by: aekaramg20
6 Replies

3. Shell Programming and Scripting

parameters

i'm supposed to come up with a script that -accepts a directory as an optional command line parameter -display an error message and terminates if more than one parameter is provided -use the current directory if no parameter is provided -displays an error message and terminates if the provided... (4 Replies)
Discussion started by: jaay
4 Replies

4. Shell Programming and Scripting

More than nine parameters

Hi, please tell me the systax for passing 11 variables(including 4compulsory variables) in shell program. ORA_USERPASS=`echo $1` USERID=`echo $2` USERNAME=`echo $3` REQUESTID=`echo $4` P5=`echo $5` P6=`echo $6` P7=`echo $7` P8=`echo $8` P9=`echo $9` shift P10=`echo $9` shift... (3 Replies)
Discussion started by: anitha126
3 Replies

5. Shell Programming and Scripting

Get Options and Parameters

Hi there. Could someone explain how do i get the options separated from the arguments. My problem is that i have a lot of options and in all of those options i need to have the parameters available to use in that option and all the others. How can i take the arguments before i cycle throw the... (4 Replies)
Discussion started by: KitFisto
4 Replies

6. AIX

tuning network parameters : parameters not persist after reboot

Hello, On Aix 5.2, we changed the parameters tcp_keepinit, tcp_keepintvl and tcp_keepidle with the no command. tunrestore -R is present in inittab in the directory /etc/tunables we can clearly see the inclusion of parameters during reboot, including the file lastboot.log ... (0 Replies)
Discussion started by: dantares
0 Replies

7. Shell Programming and Scripting

Getting parameters

Hi, I have 2 scripts one master.sh and child.sh. The master runs on a separate server and pushes the child script to the desginated server and runs it.The child script configures the designated server for our day to day use and it has lot of interactive questions which help the... (4 Replies)
Discussion started by: a12ka4
4 Replies

8. AIX

AIX Remote Connect Fail With “No more multiple IP addresses to connect” Error

We have a production server at a client site running AIX. And recently when users are trying to connect to it via telnet, it prompts "No more multiple IP addresses to connect". Can I know what does this error mean? and how to rectify this? Thanks. (2 Replies)
Discussion started by: a_sim
2 Replies

9. Cybersecurity

When i start CSF i cant connect VPS or download any data into it It appears i cant connect Linux VP?

It appears i cant connect linux VPS server via SSH or i cant SCP any file to it and i cant wget any file TO it (from inside it) while CSF (Config Server Firewall, LFD is running. Just after isntall in default configuration and after changing TESTING mode to LIVE mode. Trying to wget & install... (1 Reply)
Discussion started by: postcd
1 Replies

10. UNIX for Advanced & Expert Users

Connect direct - SFTP - List of servers that I can connect

Greetings Experts, I am working for a bank client and have a question on connect-direct and SFTP. We are using Linux RedHat servers. We use connect-direct to transfer (NDM) files from one server to another server. At times, we manually transfer the files using SFTP from one server to another... (2 Replies)
Discussion started by: chill3chee
2 Replies
JACK.PLUMBING(1)														  JACK.PLUMBING(1)

NAME
jack.plumbing - JACK Plumbing Daemon SYNOPSIS
jack.plumbing [options] [rule-files] OPTIONS
-d : Do not operate as a daemon. -o : Do not load ordinary rule files. -q : Quiet operation. -u : Set the time, in micro-seconds, that must elapse after a connection notification to indicate the end of a notification set (default=30000). This is an optimization switch. DESCRIPTION
jack.plumbing maintains a set of port connection rules and manages these as clients register ports with JACK. Port names are implicitly bounded regular expressions and support sub-expression patterns. There are four rules: connect, disconnect, also-connect and connect-exclusive. (connect "SuperCollider:out_(.*)" "system:playback_1") This connect rule ensures that whenever scsynth(1) is running any output ports it registers are connected to appropriate ALSA playback ports. The connect rule only makes a connection if none already exist. (also-connect "system:playback_1" "jack.udp-[0-9]*:in_1") This also-connect rule ensures that when jack.udp(1) is running in send mode all signals that are ordinarily sent to the local audio interface will also be sent to the network destination. The also-connect aliasing applies to both the left and right hand side of connect rules. (connect-exclusive "SuperCollider:out_(.*)" "ardour:sc3_in_1/in 1") This connect-exclusive rule ensures that if SuperCollider and an ardour(1) session with appropriate tracks are both running that SuperCollider gets connected to ardour and disconnected from everything else. This type of connection daemon has the following advantages over both environment variables and command line arguments: o it does not require any client connection support or logic at all o it provides a uniform user interface to all clients o it has a somewhat declarative style This type of daemon is very lightweight and non-intrusive: it requires no arguments, it runs from an unprivileged thread, if the rule set is empty it is a no-op, it does not write any files, it does not require any modification to clients or to how clients are started. When a set of port registrations is made it checks the modification time of the rule set files, /etc/jack.plumbing and ~/.jack.plumbing, and any files specified by the user, rereads the rule set if it has been updated, then makes the JACK graph obey the rules. Any lines beginning with a semi-colon are ignored. The rule set is sorted, disconnect rules are applied first, then connect rules, then connect-exclusive rules. FILES
o /etc/jack.plumbing o ~/.jack.plumbing AUTHOR
Written by Rohan Drape http://slavepianos.org/rd/ SEE ALSO
jackd(1) AUTHOR
Rohan Drape <rd@slavepianos.org> Author. 01/10/2012 JACK.PLUMBING(1)
All times are GMT -4. The time now is 02:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy