Networking :: Bad: Two Sockets Of Different Ports In A Single Program?
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
ADVERTISEMENT
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
View Related
Jul 25, 2010
I need to create a C/C++ program in Linux that succeeds in detecting how many tcp-sockets and what tcp-sockets are created by the other processes in the system in a particular time interval (e.g., the interval time this application is running in). Then, I'd need to get some information like local/remote port number and local/remote ip address of each of these sockets.
View 8 Replies
View Related
Aug 1, 2011
I am trying to write a chat program with sockets as part of my project. I made a socket server, using fork ,I tried to connect it with different clients.Each client will send messages to others through server.So server has a shared memory storing every clients username and client id. But the problem facing is first client is able to sent messages to every other client formed after that.But second client onwards it is not able to sent message to previously connected ones. Server is not able to write on those client id's.
View 4 Replies
View Related
Dec 11, 2010
I am trying to write to the parallel port pins from a Perl program running Ubuntu Linux, to light up led's on a bread board. I've already accomplished this on this same box using a C program, but I cannot get my code below to work. I believe the problem is with the line:
$parport = Device::ParallelPort->new('auto:0');
I've tried different variables between the ('') ticks, but nothing has worked. I use Perl on my web pages for forms, but this has stumped me.
Code is below:
#!/usr/bin/perl require "subparseform.lib"; &Parse_Form; print "Set-cookie:
cart_id=1234; user_id=123;
"; print "Content-type: text/html
"; use strict; use CGI; use Device::ParallelPort;
# use Device::ParallelPort::drv; # use Device::ParallelPort::drv::linux # use Device::ParallelPort::drv::parport
# Set up your parallel port object and tell it what driver to use.
#my $parport = Device::ParallelPort->new('auto:0'); print "It works!!!";
View 1 Replies
View Related
Jan 24, 2011
What's the total no. that the OS can create? Does this differ from 32-bit?
View 1 Replies
View Related
Jun 25, 2010
Hi ,
I created a socket.port no 21 meaning ftp client.
I am sending some stings and receviing some data from server.Fine.
But I want to send a file some x.c to host using socket.
Please can someone help me whether we can do it or not.
If we can how can we send a file.I was only able to send buffer and data but not a file.Please if possible can you help me with example.
Regards,
shaiva
View 2 Replies
View Related
Sep 14, 2010
The problem started when I noticed I couldn't upload to people using a torrent downloading program, the program listened on port X and when I sniffed on the same port I saw that syn's are forwarded correctly from my nat to that port but the program doesn't relate to those packets. Then I listened with NC, and even on another port nothing is being answered to those syns packets.
View 3 Replies
View Related
Jul 9, 2009
I have a C program which does.
1. Creates a UDP socket
2. Send the UDP Request packet to the TFTP server.
3. If the TFTP server is not listening in the 69 port, the remote machine send an ICMP ("Port Unreachable") message.
Is there a way to receive a notification from the Linux kernel on receipt of an ICMP packet to the created UDP socket.
View 1 Replies
View Related
Sep 29, 2010
root@HOST [~]# /etc/init.d/httpd start
Starting httpd: no listening sockets available, shutting down
Unable to open log [FAILED]
root@HOST [~]# /etc/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: no listening sockets available, shutting down
Unable to open logs [FAILED]
root@HOST [~]# tail -n 10 /var/log/messages
Sep 29 17:59:30 localhost avahi-daemon[2870]: New relevant interface wlan0.IPv4 for mDNS.
Sep 29 17:59:30 localhost avahi-daemon[2870]: Joining mDNS multicast group on interface wlan0.IPv4 with address 196.219.240.236.
Sep 29 17:59:30 localhost avahi-daemon[2870]: Registering new address record for 196.219.240.236 on wlan0.
Sep 29 17:59:31 localhost avahi-daemon[2870]: New relevant interface wlan0.IPv6 for mDNS.
Sep 29 17:59:31 localhost avahi-daemon[2870]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::223:cdff:fecb:9c5e.
Sep 29 17:59:31 localhost avahi-daemon[2870]: Registering new address record for fe80::223:cdff:fecb:9c5e on wlan0.
Sep 29 17:59:31 localhost NetworkManager: <info> (wlan0): device state change: 7 -> 8
Sep 29 17:59:31 localhost NetworkManager: <info> Policy set 'Sunsoft1' (wlan0) as default for routing and DNS.
Sep 29 17:59:31 localhost NetworkManager: <info> Activation (wlan0) successful, device activated.
Sep 29 17:59:31 localhost NetworkManager: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
What is the problem I have a local server
CentOS Linux
View 19 Replies
View Related
Apr 21, 2010
Running Ubuntu and writing simple C programs. I need 2 text windows, the one I have started in, and a second to display some debug information. I can start a second screen using popen("/usr/X11R6/bin/xterm" "w"), and I get my new text window. However, it is running a shell and I can't send any info to it!
View 4 Replies
View Related
Aug 19, 2010
I wrote an application that receives packets on one interface and sends them to another interface after it added a vlan header. Both the sending and the receiving is done using raw sockets. Everything seems to work fine until I get TCP packets that are of size 1514 (MTU). Once I add a vlan header to the packet, its size becomes 1518 and when I try to send it I get the returned value -1 and errno=90 (message too long). I tried to change the MTU of the NIC to a value that is bigger than 1500 but that fails. If I create a bridge using brctl and vconfig between the NICs I can see that my NIC does sends packets of size 1518. What do I need to in order to make my NIC to send packets of size 1518?
View 5 Replies
View Related
Jun 25, 2010
I would like to send a data using one thread and receive a data using other thread by using a same socket connection using USD sockets. The calls i am using for sending and receiving are send(), recv(). let me know is it possible to send and receive the data parallel (Full duplex communication)?
View 2 Replies
View Related
Jun 28, 2009
Did a netstat -an got this
Active UNIX domain sockets (servers and established)
View 1 Replies
View Related
Jun 3, 2010
I have downloaded the jdk-6u20-linux-i586.bin from their website. I also read the instruction given to install jdk manually but i was not able to run a single program. Can someone give a step by step instruction to install jdk and also tell me how to set the path so i can easily execute the programs.
View 9 Replies
View Related
Feb 1, 2010
I am looking for a program to extract a single instrument (guitar) for the purpose of learning to play it.
I don't care if it costs $ or not as long as it is native to UBUNTU 9.10 .
View 8 Replies
View Related
Oct 28, 2010
I am writing a code in Python where a socket client changes data with the server. That works nice if the connection is up. However it is also supposed to work offline. So I need to be able to detect if the connection is up before sending data, but I was not able to do so. A summary of the code is like that:
Code:
try:
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect( (self.host, self.port) )
connected = True
except:
connected = False
if connected:
data = "some data byte"
try:
socket.send(data)
except:
connected=False
socket.close()
If I unplug the cable after the connection is ready then the socket sends data and does not detect the connection failure. What is amazing is that the client detects the connection failure just after the cable has been plugged again. Of course there is a loop in the code above and always that connected==False a new connection is made. How could the program detect the connection failure before sending data and then lead the code to an exception?
View 3 Replies
View Related
Jan 18, 2011
During the development of a java application appearantly found that cannot bind more than 500 UDP sockets at the same time.
The developed java application is running on Fedora Core (x64)
Is there some procedure to check how many sockets I can bind at the same time on that linux distribution?
In case the limit exists, can it be increased easily?
$ uname -a result is :
View 2 Replies
View Related
Jul 14, 2011
I am learning about net filters and I am practicing some sample programs on it. I am very new to this and I have a general query. I got the packet to a desired function using PRE_ROUTING hook. Now how do I frame a packet from this point? I am just trying to simulate a echo client server program in the kernel level using these hooks. Any useful info on sockets in the kernel level?
View 1 Replies
View Related
Mar 5, 2011
I've looked, but no luck. Coming from Debian, 5.02, is there a setting in Ubuntu 10.10 that will allow me to single click to open a folder/launch a program. I don't mean the one i am using now that is set up with the mouse setting where it seems to be an assistive technologies application where there is a slider to set the dwell time (when i use this one, i get a menu opening at the same time as the application launch), but the one where the pointer turns to a little hand when it moves over the icon, and opens/launches the program when the button is released.
View 3 Replies
View Related
Sep 1, 2011
I have ubuntu 11.04 installed along side windows. And I often share files with windows computers. If I am installing a new package from ubuntu software center, and consquently I have to log in as root to do so, which means I have given the system 'privileges' as the program is being installed, I decide to go open mozilla, and surf suspicious sites on the net. Is it possible in that case for me to get a virus?
When we enter the password for the root user in order to run one program such as ubuntu software center, does that mean that all programs have root privileges for the time being (as the software center is installing the program)?
View 3 Replies
View Related
Apr 3, 2010
Is there a program that allows me to password lock a single file or folder?
View 5 Replies
View Related
Mar 11, 2010
For monitoring a network [LAN] I need a single C/C++ program using unix commands to retrieve the username, associated static IP address, what time user logged in, log out, total time system used by user. so that if a system has several users who used it @ different times of the day... then i need details of all users me,time of log in, static IP &all
View 1 Replies
View Related
Mar 30, 2010
I've been trying to find a way to take a bunch of jpeg images and while maintaining their quality (no loss at all) compile them in such a way as to make one coherent file. Maybe something like a pdf, but while maintaining quality. I've tried converting to pdf and djvu, but the quality is always reduced, but if you know of a way to preserve quality, I'll use it.An alternative is an image viewer that can look inside archives, so I just make a zip or tgz of the images and then use the image viewer to access them. I've tried a few
View 9 Replies
View Related
Dec 17, 2010
I'm writting an app for desktop and embedded linux and I need to get information about the multiserial port, and I need to know which port is been used (by a printer, por example).The multiserial I'm using is an Altera Corporation Device 0004, and I just need to tell how many ports are there and how many is been used.
View 3 Replies
View Related
May 10, 2011
I can successfully forward a port via:
PHP Code: ssh -L 5900:localhost:5900 test@192.168.5.1
how do I forward several ports at once. This is a wrong example but:
[Code]...
View 2 Replies
View Related
Aug 11, 2010
How can I tell if my USB ports are 2.0 ports?
View 1 Replies
View Related
Apr 6, 2010
A few months ago I installed Ubuntu 9.10 on my girlfriends laptop, on her request, as she didn't like Windows any more. Since then the internet connection periodically slows down due to too many open ports/connections. Always when this happens I call our ISP and usually there are around 80-200(!) active connections to various IP's.
She is not downloading torrents or anything.
She only uses Firefox and a few open tabs as people do.
Skype is open.
Wireless internet connection.
I am thinking either Ubuntu is updating more or less constantly or the ports/connections aren't closed "after use".
View 7 Replies
View Related
May 8, 2010
Does any body know how to enable ports in ubuntu 10.04?
View 2 Replies
View Related
May 12, 2010
I'm trying to VPN in somewhere and it doesn't like any outbound connections. I'm doing this for RDP, so can I somehow restrict the VPN connection to only be using the RDP port?
View 1 Replies
View Related