Sponsored Content
Top Forums Programming Machine dependent problems when using Sockets. Post 302569771 by ab_tall on Tuesday 1st of November 2011 12:22:10 PM
Old 11-01-2011
My initial corruption was due to lack of accounting for that 1 index. Anyways, even when I accounted for it, I was getting the corruption, so I concluded that this lack of index was not the root cause of the corruption.

Static allocation has worked around the problem for now.

Two other problems I am facing now:

1) What I am having problem understanding is, why getaddrinfo() is not able to resolve if I give it the entire hostname, whereas leaving out the domain name gives me an error stating service name or host not found.

2) Some combinations of hosts(on the same domain) are unable to interconnect.

The scenario that occurs is,
Initially master waits for incoming connections, and when all clients have connected, passes each client its right neighbours details and instructs the client 1 to go ahead and connect to its right neighbour and then so on.
However, what I am seeing is, on some machines wherein master is on one machine, and clients on another, the Player 1 receives a connect refused(even though i traced the code of the other client and ensured it was listening.
So Master is on Host1
Client 1 and Client 2 on Host 2.
Client 2 listens on port 5555.(assume)
Client 1 tries to connect to neighbour on host 2 and port 5555.
It gets a connect::connection refused.

Output of actual Run

Server Output
-------------
./master 65450 2 10
packet Master on bn19****
clients = 2
Hops = 10
client 1 is on host nom2684*****
client 2 is on host nom2684*****
<Hangs at this point>

Client 1 Output
---------------

./client bn19****
Connected as client 1
Trying to connect to host nom2684**** on port 34437
connect:: Connection refused
<exits>

Client 2 Output
---------------

Connected as client 2
I am client 2 and I am listening on port 34437
I sent my port 34437 to master
<Hangs>
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Editor dependent error?

Hi all, i did typed the following code in vi and executed it. #!/bin/sh //notice the blank line here. DATA=test echo "$DATA" There was no problem. I then deleted the file using the rm command. I used ultraedit typed in the same file. , FTP it in and i got the following output :... (2 Replies)
Discussion started by: new2ss
2 Replies

2. HP-UX

how can i make two dependent jobs into cron?

Hi all, How can i make two dependent jobs into crontab? means after the first job the second job should run in a single crontab entry in unix. (1 Reply)
Discussion started by: megh
1 Replies

3. Solaris

pkgrm without removing the dependent packages

Hi all, Is there any option to remove a package without removing the dependent packages.... ie, i need to remove a package, while trying to remove by using pkgrm command it says as some dependent packages also will get removed, i dont want to remove those dependent packages. (1 Reply)
Discussion started by: judi
1 Replies

4. Shell Programming and Scripting

Shell scripting problems - Commands not on local machine

Hello all- I have done a lot of searching tonight, but all leads seem to be dead ends. Forgive me if this has been covered, but I've searched the forum and the internet. I am having trouble building a shell script which uses SSH to login to our schools 1024 cluster grid. The issue that I am... (1 Reply)
Discussion started by: Sagan
1 Replies

5. Programming

shell scripting problems involving operations with remote machine

Hi, i have been developing a shell script to transfer a set of files from one ubuntu system to another. Task: while executing the script the files ( ls, dir, cat) in the source machine should transfer to destination machine(at /home/mac/mac/bin) While the script is executed once again, It... (0 Replies)
Discussion started by: srijith
0 Replies

6. Slackware

Context dependent symlinks

Ive got multiple PCs, sharing an NFS mounted home dir. For certain apps I would like to keep the config files host specific. Easy solution is to create symlinks to local folders for configs. Ideally I would still want the .config files to reside in the user home folder. Is it possible to... (2 Replies)
Discussion started by: agentrnge
2 Replies

7. UNIX for Advanced & Expert Users

AIX Dependent Module could not be loaded

I am encountering the above error , even after setting the environment variables correctly AFAIK. I've found sources that say LIBPATH is the shared library variable , and others that say LIB_PATH, so I set both: ========================= root@lipossrp01ga: # echo $gtm_dist ... (6 Replies)
Discussion started by: Clovis_Sangrail
6 Replies

8. AIX

Dependent modules libc.a and libpthreads.a

Hello I am trying to install ActivePerl Pro Studio and I am seeing the following errors. Could not load program ./setup: Symbol resolution failed for setup because: Symbol ___memcmp (number 1) is not exported from dependent module /usr/lib/libc.a(shr.o). ... (2 Replies)
Discussion started by: flagman5
2 Replies

9. Shell Programming and Scripting

Script to Start services based on dependent services on other AIX machine

Hi, I just started working on a script. After my research, i found a command which can help me: AIM: To build a script which starts the services (Services 1) on server 1 automatically whenever its down. And it has a dependency on other service (Service 2) on Server 2. So my script has to... (4 Replies)
Discussion started by: draghun9
4 Replies

10. IP Networking

Problems and doubts with sockets and timeouts

Hi! I need some help to understand a little bit more the behaviour about socket and TCP connections... Here is my problem I have a client and a server that were written in python. The server program wait until a message arrive and then print the message but if the message not arrive in a second... (2 Replies)
Discussion started by: Kovalevski
2 Replies
Gnome2::Client(3pm)					User Contributed Perl Documentation				       Gnome2::Client(3pm)

NAME
Gnome2::Client - wrapper for GnomeClient HIERARCHY
Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gnome2::Client METHODS
client = Gnome2::Client->new client = Gnome2::Client->new_without_connection $client->add_static_arg (...) o ... (list) $client->set_clone_command (...) o ... (list) string = $client->get_config_prefix $client->connect boolean = $client->connected $client->set_current_directory ($dir) o $dir (string) string = $client->get_desktop_id $client->set_discard_command (...) o ... (list) $client->disconnect $client->set_environment ($name, $value) o $name (string) o $value (string) clientflags = $client->get_flags $client->flush string = $client->get_global_config_prefix $client->set_global_config_prefix ($prefix) o $prefix (string) string = $client->get_id Gnome2::Client->interaction_key_return ($key, $cancel_shutdown) o $key (integer) o $cancel_shutdown (boolean) client = Gnome2::Client->master string = $client->get_previous_id $client->set_priority ($priority) o $priority (integer) $client->request_interaction ($dialog_type, $function, $data=undef) o $dialog_type (Gnome2::DialogType) o $function (scalar) o $data (scalar) $client->request_phase_2 $client->request_save ($save_style, $shutdown, $interact_style, $fast, $global) o $save_style (Gnome2::SaveStyle) o $shutdown (boolean) o $interact_style (Gnome2::InteractStyle) o $fast (boolean) o $global (boolean) $client->set_resign_command (...) o ... (list) $client->set_restart_command (...) o ... (list) $client->set_restart_style ($style) o $style (Gnome2::RestartStyle) $client->save_any_dialog ($dialog) o $dialog (Gtk2::Dialog) $client->save_error_dialog ($dialog) o $dialog (Gtk2::Dialog) $client->set_shutdown_command (...) o ... (list) SIGNALS
boolean = save-yourself (Gnome2::Client, integer, Gnome2::SaveStyle, boolean, Gnome2::InteractStyle, boolean) die (Gnome2::Client) save-complete (Gnome2::Client) shutdown-cancelled (Gnome2::Client) connect (Gnome2::Client, boolean) disconnect (Gnome2::Client) ENUMS AND FLAGS
flags Gnome2::ClientFlags o 'is-connected' / 'GNOME_CLIENT_IS_CONNECTED' o 'restarted' / 'GNOME_CLIENT_RESTARTED' o 'restored' / 'GNOME_CLIENT_RESTORED' enum Gnome2::DialogType o 'error' / 'GNOME_DIALOG_ERROR' o 'normal' / 'GNOME_DIALOG_NORMAL' enum Gnome2::InteractStyle o 'none' / 'GNOME_INTERACT_NONE' o 'errors' / 'GNOME_INTERACT_ERRORS' o 'any' / 'GNOME_INTERACT_ANY' enum Gnome2::RestartStyle o 'if-running' / 'GNOME_RESTART_IF_RUNNING' o 'anyway' / 'GNOME_RESTART_ANYWAY' o 'immediately' / 'GNOME_RESTART_IMMEDIATELY' o 'never' / 'GNOME_RESTART_NEVER' enum Gnome2::SaveStyle o 'global' / 'GNOME_SAVE_GLOBAL' o 'local' / 'GNOME_SAVE_LOCAL' o 'both' / 'GNOME_SAVE_BOTH' SEE ALSO
Gnome2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object COPYRIGHT
Copyright (C) 2003-2004 by the gtk2-perl team. This software is licensed under the LGPL. See Gnome2 for a full notice. perl v5.14.2 2011-11-16 Gnome2::Client(3pm)
All times are GMT -4. The time now is 10:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy