I've been asked to look into adding multicast support to a Java trading system but, to be honest, I don't have the slightest clue what this could be for. Would this mainly be to allow the trading system to broadcast trade messages to different types of clients, say, a mobile phone as well as a server? Why might a trading system need mult...
I'm writing simple server/client and trying to get client ip address and save it on server side to decide which client should get into critical section. I googled it several times but couldn't find proper way to get ip address from sock structure.
I believe this is a way to get ip from sock struct after server accept request from client...
I have a UDP socket that is bound to INADDR_ANY to listen to packets on all the IPs my server has. I'm sending out replies through the same socket.
Right now the server chooses automatically which IP is used as the source IP when packets are sent out, but I would like to be able to set the outgoing source IP myself.
Is there any way to...
My client application uses a boost::asio::ip::tcp::socket to connect to a remote server.
If the app loses connection to this server (e.g. due to the server crashing or being shutdown) I would like it to attempt a re-connect at regular intervals until it succeeds.
What do I need to do on the client-side to cleanly handle a disconnect, ti...
I am writing a simple C# tcp client and server program. The server will eventually be on a different machine but now I am just testing on the same machine. I am getting an exception error "Only one usage of each socket address (protocol/network address/port) is normally permitted" when I create my TcpClient using the ip address. But it...
Hi
Does any one have an example for ReceiveFromAsync works with regard to UDP? i couldn't find any sample code. I can find a few TCP sample but msdn say 'The ReceiveFromAsync method is used primarily to receive data on a connectionless socket'.
Thanks,
Nick
...
Hi,
I'm working in a project for the iPad, it is a small program and I need it to communicate with another software that runs on windows and act like a server; so the application that I'm creating for the iPad will be the client.
I'm using CFNetwork to do sockets communication, this is the way I'm establishing the connection:
char ip[...
Hi,
I'm writing a light remoting app to assist in debugging a problem with remoting communication. This app mimics much of what a larger application does:
Periodically sends a heartbeat to
another peer application, and
periodically verifies that a heartbeat
has been received within some time
threshold.
What we're seeing is...
I'm working on an application that accepts TCP connections and reads in data until an </File> marker is read and then writes that data to the filesystem. I don't want to disconnect, I want to let the client sending the data to do that so they can send multiple files in one connection.
I'm using the StreamReader.EndOfStream around my out...
I make a recv call on a TCP socket and it tured out to be that the recv call is a blocking one even though the socket itself has set to be in non-blocking mode. So my question is just as simple as: how to implement a non-blocking recv on a perl socket? thanks in advance.
...
Hi,
I switched from Lighttpd server to WAMP and then found sockets in php are not working. But php is configured and working. (phpinfo() works) I removed the comment for the php_sockets.dll in php.ini @ C:\wamp\bin\php\php5.2.5.but still gives the error "Fatal error: Call to undefined function socket_create()". Any more configurations t...
I am using Silverlight to interact with a proxy application that I have developed but, without the proxy sending a message to the Silverlight application, it executes the receive completed handler with an empty buffer ('\0's). Is there something I'm doing wrong? It is causing a major memory leak.
this._rawBuffer = new Byte[this.BUFFER...
I'd like to create various network errors during testing. I'm using the Berkely sockets API directly in C++ on Linux. I'm running a mock server in another thread from within Boost.Test which listens on localhost.
For instance, I'd like to create a timeout during connect. So far I've tried not calling accept in my mock server and sett...
Hello need some help!
I´m trying to implement a socket connection, and my client shows the folowing:
mySocketClient: IOException: java.net.SocketException: Connection reset
java.net.SocketInputStream.read(Unknown Source)
java.net.SocketInputStream.read(Unknown Source)
java.io.DataInputStream.readShort(Unknown Source)
mySocketClient.con...
I'm having a little test program that sends a lot of udp packets between client->server->client (ping/pong test). The packets are fixed size on each run(last run is max allowable size of udp packet) I'm filling the packets with random data except for the beginning of each packet that contains the packet number. So I'm only interested to ...
3 questions:
1) What is the difference between connection and read timeout for sockets?
2) What does connection timeout set to "infinity" mean? In what situation can it remain in an infinitive loop? and what can trigger that the infinity-loop dies?
3) What does read timeout set to "infinity" mean? In what situation can it remain in an...
If I use send() on a non-blocking tcp socket in Linux will it return EAGAIN for anything other than a send buffer full condition?
I basically need to decide if I want to use the socket send buffer as the only buffer for my app or if I need my own user space buffer to feed the socket buffer.
...
In PHP, what are the biggest considerations when choosing between using http_get("https://...") and a sockets loop with fsockopen("ssl://..."), fputs() and fread()?
I’ve seen a couple of implementations lately that use the latter. Is that just old legacy code or is there some good reason for it?
Thanks.
...
Hi,
I've been working with CFNetwork to create a client application for iPad, it is a small application, nothing fancy.
This is how I create the connection to the server (running in windows).
- (void) startConnection
{
char ip[] = "192.168.0.244";
NSString *ipAddress = [[NSString alloc] initWithCString:ip];
/* Build our s...
I have two devices that are interfaced with PCI. I also have code for both devices that uses generic socket code. (The devices were originally connected by MII/Ethernet.)
Now, I need to write a PCI device driver to transport packets back and forth between the two devices.
How do I access the file descriptors opened by the socket co...