Programming :: Connect Multiple Sockets From A Single Client To A Single Server And Keep Them Open?
Oct 13, 2010
I have question about the UNIX sockets. my goal is to connect multiple sockets from a single client to a single server and keep them open...I'm not sure if that is possible to create or not. Do you have any suggestion or an example of code?
View 1 Replies
ADVERTISEMENT
Jul 1, 2010
I am new in client server programming and i have written code for single server to single client communicating one port(3490). but i have no idea how my single server will be communicate with different client on different port.how this will be happen ?
Any idea to understand the logic or send any good link or any piece of code in c , i searched on net but all help was mostly for java progamming.
View 1 Replies
View Related
Nov 30, 2010
I have written a server application which has select for both incoming new client connection requests and incoming data from client. I am able to process incoming connection requests and client data.
For example, server has 8 clients connected to it. If client 3 disconnects from server, how will server come to know this client has disconnected and to close its client socket fd gracefully? Does server's select get data on that client socket fd as 'close' data or any error code in recv() function that notifies server to close this client socket fd? Also if client disconnects abruptly without sending close request to server, how should server handle this? Does server get "EPIPE" error?
View 1 Replies
View Related
Oct 10, 2010
My senior project team at Penn State is starting to write our code, and I was looking for a revision control system to manage it. I was going to use CVS, but I can't find a client that doesn't have to install something on the local machine(we dont have administrative permissions on school computers). Is there a CVS(or Subversion or anything else) client that comes as a single executable file or web interface?
View 3 Replies
View Related
Mar 4, 2011
I am trying to make a file proxy server...that is any request of file a client makes goes to the proxy server...it checks it in cache if not there then asks main server for the file. to act as a server for client and as client for server...how to do it in a single program. I tried with 2sockets with different ports one for client-proxy server and one for proxyserver-main server.But it does not workAm i doing something wrong or is there any other method
View 2 Replies
View Related
Apr 26, 2011
Is it possible to handle multiple signals in just one handler? I only know singal() catches one signal at a time
View 2 Replies
View Related
Nov 13, 2010
I have a huge binary log file. There are lets say 4 id's that I want to find in a log file. I know that those 4 id's will be present in the log file and I also know in what order they will be present. I want to find 1st id from the log then 2nd id and then third id and so on..
Simple/inefficient solution is: Loop through the id's and then grep in the log file. Problem with this solution is for each id grep will search from the beginning of the file.
Better/efficient solution would be: Sine I know the order in which id's will be present in the log file. Loop through id's, grep 1st id and then move on to grep 2nd id and so on...this way I can grep all id's in one pass. Is this solution possible ?
I have 500000 + values to find in log files and I have to find efficient solution for it.
View 2 Replies
View Related
Jan 20, 2011
We can add multiple IP address on a single NIC. Is there any limitation that is how many ip address I can add on a single NIC card??
View 1 Replies
View Related
Jun 9, 2010
I have a problem creating my second socket in client file. the program was running well but when I try to add another socket to connect to the same server, I got a problem connecting to the first socket! it doesn't make sense. the original code was:
sockfd[i] = socket(AF_INET, SOCK_STREAM, 0);
if(sockfd[i] < 0) error("(MAIN) - Error openning socket 1");
port_num[i] = portno;
bzero((char*) &serv_addr[i], sizeof(serv_addr[i]));
[Code].....
View 1 Replies
View Related
Feb 27, 2011
have a look at the following thread story and please clear my doubt.
View 6 Replies
View Related
Mar 27, 2010
We have too many audio Paths, for each user have one. We would like to create a unique folder to Read in network.
For example:
The idea is Mapping all folders to the path /pub/Music in server, so all user can access all music online in the server.
Very Well. How we can do it?
And when pc1 and pc2 have the same subfolder, like Beatles, and in the subfolder have different folders ( PC1-Beatles/Revolver ) (PC2-Beatles/Habbey_Road) or The same folder (PC1-Beatles/The_Mistery_Magic_Tour) (PC3-Beatles/The_Mistery_Magic_Tour)...
Is there a way to contemplate this issue?
View 4 Replies
View Related
Dec 10, 2010
How to run multiple X server in single terminal in linux .Is it possible .
View 3 Replies
View Related
May 13, 2011
Have this script which is reading in a series of files, one at a time with while-do-done loop, each file goes through various greps/awk's where this info is then saved to various files for later use. i.e....
Script is being run on Linux Red Hat,
In one of the grep/awk's the output (currently) are 2 columns (min max), i.e....| awk '{print $1, $2}' | sort -u which outputs (e.g.)
The number of "min max" pairs varies from file to file. Want to output a single column of unique numbers from the min max pairs & get the number of them for input to a file...i.e...
Where <PROCESS> is some process/technique that will generate a single column of integers (increment of 1) to pipe into the next one (sort -u)
i.e. (example from above)
Have tried command seq - only works for single pair input i.e.
Is there any command like seq etc which will output a single column based on a input of min max numbers (increment 1) to pipe onwards to next command?
View 4 Replies
View Related
Mar 15, 2010
I am looking at setting up a multiple postfix SMTP servers for a single domain. Below is my requirement, I would appreciate if someone out there could guide me to achieve this using postfix..
1. Want to setup 2 postfix SMTP Server with 1 POP3 Server.
2. Server1 will host POP3 & SMTP services for domain "metallica.one".(IP: 1.1.1.1, MX: mx1.metallica.one)
3. Server2 will host only SMTP services for domain "metallica.one" (IP: 1.1.1.2, MX: mx2.metallica.one)
4. Server1 & Server2 will be used as load balancing for sending mails. (either manual settings in email client, or auto-loadbalancing is still preferred).
5. Mail received for domain metallica.one on Server2 should be pushed/forwarded/relayed to Server1 where POP3 services are running.
6. Outgoing mails for other domains from Server2 should be sent directly to the other-domain-recipients without relaying to Server1.
View 2 Replies
View Related
Feb 4, 2010
I have configured a file server with samba and winbind in RHEL5.I am able to allot permission for the active directory groups to my Linux folder.No issues.But i want to set multiple groups of active directory to get ownership to a single directory. Say there are 3 groups a,b,c to have permissions to a folder of the Linux machine.
Code:
chown -R root:Active_directory_group_name path_to_linux directory
I have set
Code:
chmod 770 /myshare
meaning that user and group would have full rights to /myshare
Code:
chown root:a
works great I tried with the option of
Code:
chown -R --reference=/etc/shares_own.txt /myshare
In reference file(shares_own.txt) i gave the entry as
Code:
root:a,b,c
This is not working.
View 7 Replies
View Related
Aug 4, 2010
Our system uses email to send fairly time-sensitive status messages between programs running on various servers on a WAN. Each email message is sent to two addresses (different servers). The problem occurs when one of the destination mail servers is off the network. I think because it's trying to send one email to two addresses, sendmail attempts delivery to the first address, then to the second address (i.e., serially). When this happens, it hangs for two connect timeout (CONNECT_TO) periods trying to connect to the offline destination, then after the timeout, it then delivers to the other destination. I'm trying to figure out how to work around that connection delay so it doesn't delay delivery to the other destination.
I'm working with the network guys to enable the right ICMP messages that signal when a network is unavailable, but I would also like to try having sendmail split the emails into two envelopes, then use parallel, independent connections for delivery.
After days of reading through the docs (O'Rielly Sendmail book + sendmail docs) I think one way to do this is to use multiple mail queues, but I can't decipher exactly how to do that from the docs.
There might be other, more elegant ways to do the same thing, but again, trying to decipher the docs has my head swimming. (This is my first experience with sendmail.)
View 1 Replies
View Related
May 28, 2010
In my production setup, i have 3 servers using the same mount point. However, i see that the IOPS is low. Does this kind of architecture have any impact on IOPS. In case it is neutral, how can i tune my setup for better IOPS.
View 1 Replies
View Related
Aug 25, 2010
I currently am running 10.04.1 and have successfully setup my home web server to run a single website. My current settings are:
-I have registered the domain name annarrankings.com through godaddy
-A record is - host = @ and points to = 71.114.220.3
-CName is - host = www and points to = @
-on my server I have the site running in /var/www
I've done some research and found that to run multiple websites I need to setup VirtualHost.
-So I created a folder /var/www/annarrankings.com and moved my site to that folder
-Edited Apache2.conf to add the following line
-I then went to /etc/apache2/sites-enabled and copied the default file to a new file called annarrankings.com. Here's the annarrankings.com file after I edited it
-I then created a link in /etc/apache2/sites-enabled to the annarrankings.com file in /etc/apache2/sites-available
-Next I editied /etc/hosts
-When i went to enable the site using a2ensite annarrankings.com I got the following
I figured this was ok since I had already created a symbolic link earlier (a result of trying to following multiple tutorials and ..... videos at once) so I reloaded apache2. I created an index.html file in /var/www/ just for testing purposes and when I load www.annarrankings.com I get the file located in /var/www/ instead of the website located in /var/www/annarrankings.com Do I need to change my A record or CName in godaddy or did I just do this completely wrong?
View 8 Replies
View Related
Sep 28, 2010
A simple TCP based chat server could allow users to use any TCP client (telnet, for example) to communicate with each other. For this question you should consider a single process, single thread server that can support exactly 2 clients at once, the server simply forwards whatever is sent from one client to the other (in both directions). Your server must not insist on any specific ordering of messages as soon as something is sent from one client it is immediately forwarded to the other client. As soon as either client terminates the connection the server can exit
View 4 Replies
View Related
Jul 15, 2010
I have a multicolumn datas, like
a1 b1 ... f1
a2 b2 ... f2
. . ... .
[code]...
I would like to make a file with all these data in one column, like
a1
a2
.
.
[code]....
Can it be done with awk or some other command? Also, is it possible then do add another column in front of this one with numbers of the lines (for every previous column), like
1 a1
2 a2
. .
. .
[code].....
View 14 Replies
View Related
Apr 20, 2011
I have files a, b, c and d. They're all relatively large and are served up by a static web server optimized for this purpose. I can get requests that look like this:
/abcd
/ad
/bacdac
...
Each request is basically a request for a concatenation of the files in the order of the letters. The list of possible requests is finite, but large enough that disk space will run out very quickly and be very expensive if I create all possible files via concatenation.Is there a way to create a pointer file like abcd that is essentially a multi-file symlink that first points to a then to be then to c then to d? So if the contents of the files were as follows:
a: hello
b: there
c: whats
[code]....
View 3 Replies
View Related
Jan 23, 2011
I've been trying to set multiple IP my Fedora 14 but nothing seems to work. Upon browsing the net, I found there are two ways for it. One is eth0:0~eth0:n nd another is eth0-range0. All are configs under network-scripts. But neither of them worked for me. Even grabbing a working example from my live server doesn't do the trick (though the server is a CentOS 5.5).
Currently using eth0-range0
ONBOOT=yes
IPADDR_START=192.168.1.127
[code]...
View 2 Replies
View Related
Jun 29, 2010
I have an Ubuntu install on an 8Gb SDHC Card, customized for my Toshiba NB205. It took quite a bit to get sound and BT working, but now it's fine. Just out of curiousity, I used this same SDHC Card to boot my Dell D610 -- it booted, and sound and WiFi worked fine. I was surprised. There was a single error message after the desktop appeared, but I didn't record it.
I am now wondering: is it practical to use a single USB installation with multiple devices? I can imagine a number of complications, but was surprised that my attempt worked on two very different hardware platforms. There was discussion, when pendrives first appeared, of being able to use one to boot any PC to your own USB-based OS, bypassing any other OS installed on the PC.
View 4 Replies
View Related
Mar 6, 2011
Is there any limitation to the number of transactions through a single port if so then if we assign multiple port to that particular service then the performance is increased (what i suppose)
so: Is there any way to assign multiple Ports to a single service. like for a web server the main service is httpd or some thing like that to be running on the server and now if we assign multiple ports to that service then the performance increases.
View 2 Replies
View Related
May 8, 2009
I would like to know if I need multiple IPs' to setup two SSL urls on the same Apache server? Two ssl certificates, one IP - is it possible?
View 4 Replies
View Related
Jan 14, 2010
I've got a co-worker who is trying to connect multiple devices to his wireless router - Xbox, Wii, TV, Dishnetwork box, etc. Not all of the devices are wireless however. He's had several thoughts on how to get this done and I know very little about this kind of thing so I thought I'd ask some of you.
His first thought was to buy a multi port bridge, but he doesn't like any of the ones he's seen so far.The other thought was to connect all of the devices to a switch and then use a single bridge, but he isn't sure if this would work.
View 8 Replies
View Related
Apr 5, 2011
I'm trying to disable multiple logins for a single user on Ubuntu 10.10 but I haven't been able to find a way to do this on this version
View 4 Replies
View Related
Apr 23, 2011
One of the things I wanna do is create a partition which spans across multiple HDD's. is this possible? would I need to cluster the HDD's first then add the cluster to the partition?
View 3 Replies
View Related
Jul 26, 2011
I'm using my home server to netboot into live CDs. To summarize that article, netbooting a liveCD system involves passing an NFS host:/path in kernel's command line, which is subsequently mounted as /cdrom on the live system. The article mentions copying the contents of the iso image to a place on the hard drive, but I see no reason for this, since the contents need to be read-only anyway, which is easy to achieve by mounting the iso through a loop device:
Code:
# mount
...
/dev/loop0 on /mnt/kubuntu-lucid-amd64 type iso9660 (ro)
/dev/loop1 on /mnt/kubuntu-natty-amd64 type iso9660 (ro)
[code]....
Now, I am using NFS to mount a regular (rw, HDD) directory which I use as a network drive and I can mount any subdirectory and still access all the files within, ie. when I export /data on the server, I can still mount /data/downloads on the client:
Code:
server:# exportfs
/data 192.168.1.4/32
client:$ sudo mount -t nfs 192.168.1.1:/data/downloads /mnt/netshare
[code]....
Is it possible to export just /mnt and be able to mount any/all of the subdirectories? NFS doesn't like going across multiple file systems:
Code:
server:# ls -al /mnt/kubuntu-natty-i386/
total 3532
dr-xr-xr-x 11 root root 4096 2011-04-27 11:29 .
drwxr-xr-x 7 root root 4096 2011-07-25 21:46 ..
[code].....
When I try to export just /mnt and mount /mnt/kubuntu-natty-i386 on the client, the mount succeeds but the mounted directory is empty.
View 1 Replies
View Related
Aug 24, 2011
I am using DVD::rip to convert some instructional DVD's to .avi (xvid + mp3). I have never used this app before but its seems fairly straight forward and easy to use. I am able to convert 1 title from the DVD to 1 avi file. One DVD however has 19 titles which vary from 3-5 minutes in length. My question is, can I convert all or at least some titles to a single .avi file and if so how?
View 1 Replies
View Related