sockets

UDP multicast from specific network card

I'm looking for some networking gurus to help me with a problem. I have many computers running my software which uses UDP multicasting. This works fine if the computers are connected ONLY to one network (network A). My computer (which is also running said software) will listen on port XXXX for the multicasts. This computer has two networ...

Why does the socket accept function not release after closesock called?

I have a server application that opens a socket and listen for a connection. In the application, I have a separate thread that creates a socket, binds it and calls the listen and accept functions on it. When the application closes I call closesocket on the socket that was created, then wait for the socket thread to close. However, if...

Silverlight Low Level Socket Support?

I have a Silverlight app that needs low-level socket support. It's an Out-of-Browser Trusted app, so it has more network permissions. But, I noticed that that Silverlight only supports limited TCP sockets, even with elevated permissions. The method "SetSocketOption" has been removed too. I didn't think that was too big of deal as I knew ...

client socket sends data but server socket does not receive them. c++ buffered stream!?

I am working on a project where a partner provides a service as socket server. And I write client sockets to communicate with it. The communication is two way: I send a request to server and then receive a response from server. The problem is that I send the data to the server but apparently the server cannot receive the data. From my ...

Does anyone know if ios4 supports unix domain sockets?

The following works without error on OSX 10.6, but fails in the iphone simulator using SDK 4.1 #include <arpa/inet.h> #include <netdb.h> #include <sys/socket.h> #include <sys/stat.h> #include <netinet/tcp.h> #include <sys/un.h> #include <string.h> int main(void) { int sock = socket(AF_UNIX, SOCK_DGRAM, 0); struct sockaddr_un ...

How to do like "netstat -p", but faster?

Both "netstat -p" and "lsof -n -i -P" seems to readlinking all processes fd's, like stat /proc/*/fd/*. How to do it more efficiently? My program wants to know what process is connecting to it. Traversing all processes again and again seems too ineffective. Ways suggesting iptables things or kernel patches are welcome too. ...

Socket Error using localhost

Hello I am using xampp & i wnat to mail form localhost . so for that i confige PHP.ini & sendemail.ini all time in bowser so nothing in error but in mail debug file show me Socket Error # 10049 how can fix thsi issue. i try a lot. in my machine i have Windows 7. Kindly help me ...

TCP retry in PHP sockets

I have a socket server that listens to connection on port 5001, when a connection is accepted and data is received i request my database to create a packet of data in a particular format and write it back to client. To make the data transmission more reliable i have to implement a TCP retry in PHP, how do i go about this my current impl...

What does EAGAIN mean?

As in the title what does EAGAIN mean? ...

How to convert cygwin socket handle to WinSock handle?

Under cygwin 1.7.* , how to convert cygwin socket handle to WinSock handle? ...

How can I access a socket in VBA?

Is it possible to build a micro-webserver using just Excel VBA? I can't find any working examples (some examples found, none working). ...

VS2008 Compile error with <winsock2.h>

Getting heaps (105) of redefine & syntax errors when trying to compile my VS2008 c++ project with <winsock2.h> included. Running Windows 7 64bit. I have googled and searched and the answer seems pretty uniform but it doesn't seem to work for me. Tried putting #include <winsock2.h> before #include <windows.h>. Also tried not including <w...

file transfer to multiple sockets simultaneously

Hi, In perl, is there a way to broadcast a file from a server socket to multiple client sockets? I want to transfer a single file to multiple systems in least amount of time. Thanks, Akshey ...

protocol buffers and actual transport options - sockets or middleware

Hi there, I am developing a client/server application for which I am evaluating a few options for the communications layer. As part of this communication framework, I am contemplating using google's protocol buffer (PB) for representation of the transport data instead of re-inventing my own binary structure. Now coming on to the actua...

SocketChannel in Android

Hey there, I have a question about SocketChannels in Android. This is my code: SocketChannel socketChannel = SocketChannel.open(); socketChannel.connect(new InetSocketAddress("127.0.0.1", 90)); This code works in Java but not in Android. I always get an IOException My first problem was the first line. I had to add permissions to open...

PHP CLI + Ajax for web terminal

I'm trying to determine the best approach to providing an Ajax based terminal using PHP. I haven't made an attempt at writing it yet but having rolled the idea around, the only way I could see it possible, would be 2 scripts: Script 1; handles Ajax communication between server and client browser. when a request is made to use the termi...