sockets

Having trouble achieving 1Gbit UDP throughput

For UDP packets with a payload less then 1470, is it possible to achieve 1Gbit throughput? Due to the small packet size, there should be some bottlenecks in achieving such throughput (I/O, OS, network, etc.). I imagine drivers and hardware might have to be tuned to small packet/high throughput. Has anybody attempted successfully achieved...

Scalable socket event queue processing

My C# class must be able to process a high volume of events received via a tcp stream style socket connection. The volume of event messages received from the tcp server by the class's socket is completely variable. For instance, sometimes it will only receive one event message in a period of ten seconds and at other times it will receive...

TcpClient.Connected returns true yet client is not connected, what can I use instead?

In VB.net I'm using the TcpClient to retrieve a string of data. I'm constantly checking the .Connected property to verify if the client is connected but even if the client disconnects this still returns true. What can I use as a workaround for this? This is a stripped down version of my current code: Dim client as TcpClient = Nothing...

Why do I get "java.net.BindException: Only one usage of each socket address" if netstat says something else?

I start up my application which uses a Jetty server, using port 9000. I then shut down my application with Ctrl-C I check with "netstat -a" and see that the port 9000 is no longer being used. I restart my application and get: [ERROR,9/19 15:31:08] java.net.BindException: Only one usage of each socket address (protocol/network address...

What is a good tutorial/howto on .net / c# socket programming.

I'm porting old VB6 code that uses the Winsock control to C#. I haven't done any socket programming and I wonder if anyone has a good reference/tutorial/howto that I can use to start getting up to speed. I'm appealing to the hive mind while I proceed with my generally unproductive googling. I'm using UDP, not TCP at this time. ...

Rsync on Windows - Socket operation on non-socket

I get the following error when trying to run the latest Cygwin version of rsync in Windows XP SP2. The error occurs for attempts at both local syncs (that is: source and destination on the local harddisk only) and remote syncs (using "-e ssh" from the openssh package). Any advice on how to fix/workaround it? bash-3.2$ rsync -a dir1 dir...

What do you use when you need reliable UDP?

If you have a situation where a TCP connection is potentially too slow and a UDP 'connection' is potentially too unreliable what do you use? There are various standard reliable UDP protocols out there, what experiences do you have with them? Please discuss one protocol per reply and if someone else has already mentioned the one you use ...

Closing/cleaning up "mixed" file descriptors / sockets.

When I create a socket using accept() and make a FILE out of it using fdopen(), what do I have to do to clean everything up? Do I need to do fclose() on the FILE, shutdown() and close() on the socket, or only the shutdown() and or close() or fclose()? If I don't do fclose(), do I have to free() the FILE pointer manually? ...

Reading from a promiscuous network device

Does anyone know how to read from a promiscuous (or sniffing) device in C? I know that you need to have root access to do it, but I was wondering if anyone knew what functions were necessary to do this (normal sockets wouldn't seem to make sense here)? I want to write a real-time analysis tool for wireless traffic. ...

socket listen backlog parameter, how to determine this value?

How should I determine what to use for a listening socket's backlog parameter? Is it a problem to simply specify a very large number? ...

How do you specify a port range for Java sockets?

In Java you can give the number zero as a single parameter for the Socket or DatagramSocket constructor. Java binds that Socket to a free port then. Is it possible to limit the port lookup to a specific range? Thanks in advance, Roland ...

Getting Socket closed error when a remoting exception is thrown on the server

Hello, I have an app that is built using .Net remoting. When authenticating, If there is an error, I threw an exception on the server. The exception is serializable. But when the exception is thrown on the server, Sometimes I see an error on the client side that says "An established connection was aborted by the software in your host ma...

why would an application acts differently after VS debugger is attached?

There is a desktop application written in c# trying to manage a socket connection and failing but being successful after same application is attached to visual studio. how can it be debugged? ...

Get the IP Address of local computer

In C++, what's the easiest way to get the local computer's IP address and subnet mask? I want to be able to detect the local machine's IP address in my local network. In my particular case, I have a network with a subnet mask of 255.255.255.0 and my computer's IP address is 192.168.0.5.because I need to get these had two values programm...

Lower than low level common bsd sockets

How do you do low low level sockets in C, example: actually sending a SYN. ...

How to receive UDP Multicast in VxWorks 5.5

I have been unable to receive UDP multicast under VxWorks 5.5. I've joined the multicast group: setsockopt(soc, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *) &ipMreq, sizeof (ipMreq)); Similar code on an adjacent Windows machine does receive multicast. I am able to send multicast from VxWorks; ifShow() indicates the interface is multicast c...

java.net.SocketException: Software caused connection abort: recv failed

I haven't been able to find an adequate answer to what exactly the following error means: java.net.SocketException: Software caused connection abort: recv failed Notes: This error is infrequent and unpredictable; although getting this error means that all future requests for URIs will also fail. The only solution that works (also, o...

Java Multicast Time To Live is always 0

I have a problem with setting the TTL on my Datagram packets. I am calling the setTTL(...) method on the packet before sending the packet to the multicastSocket but if I capture the packet with ethereal the TTL field is always set to 0 ...

Exceptions vs Result Codes for a socket client class.

Hello, I have a class that encapsulates tcp socket communications with a server. For each command message sent to the server, the server will send back a response message that invariably contains a response code (OK, Fail). Using my class, each command can be executed either sync or async. There are basically two types of exceptions tha...

Socket programming for mobile phones in Python

I've written code for communication between my phone and comp thru TCP sockets. When I type out the code line by line in the interactive console it works fine. However, when i try running the script directly through filebrowser.py it just wont work. I'm using Nokia N95. Is there anyway I can run this script directly without using filebro...