I don't mean how to connect to a socket. What should I know about UDP programming?
Do I need to worry about bad data in my socket?
I should assume if I send 200bytes I may get 120 and 60 bytes separately?
Should I worry about another connection sending me bad data on the same port?
If data doesnt arrive typically how long may I (typ...
I have a Linux application that opens a UDP socket and binds it to a port. I haven't had any problem sending unicast packets through the socket. I had occasion to send a broadcast packet, so I enabled SO_BROADCAST, which allowed the broadcast packets to pass, but then I noticed that the unicast packets were being broadcast as well. Is...
I was asked to look at some code for a friend. (I rightly hesitated due to the MFC and lots of bad code, but he won...)
This is a dialog box based application that uses a CAsyncSocket.
The problem manifests in some nonstop debugbreaks and other similar things - there are also problem with an MFC ENSURE() macro - checking the socket ...
Hi,
I have to create an sample code that connect to a socket server, and then be able to send multiple NSString through the socket.
In the begging i start using NSStream objects, but i had a problem to reuse the socket (maybe i'll post another question if the nsstream solution is the best), and when i google socket for iPhone programmi...
Hello,
I'm trying to use the NSStream objects to open and then write and read on a socket but i have a problem.
I don't know how to write on the socket, after i have opened it.
Here is how i have done
1) first openning the socket :
NSURL *website = [NSURL URLWithString:urlStr];
if (!website) {
NSLog(@"%@ is no...
I have a thread that is supposed to listen for acknowledgements of messages and process them, but it seems that the thread is never reciving the acknowledgements.
Here is the relevant code in the thread:
private class TcpReader extends Thread {
BufferedReader reader;
boolean running = false;
public TcpReader(BufferedReader...
I am writing a UDP test client/server and i want to get it through firewall. Supposedly all i need to do is have both sides send to the correct IP and server. Getting an IP is not a problem but how do i have the client pick a random free port and report it to the user? I eventually would want it to connect to a matchmaker server but righ...
Hi everybody!
I was wondering if sending a file with a jpg extension through a socket_stream, this automatically makes the transformation of bytes to jpg ? or need to implement some algorithm to transform the lot of bytes to image... Please could somebody explain me the way to do?
...
I recently migrated my web services from Axis to CXF (2.1). It appears that while Axis needed the "axis.socketSecureFactory" set, CXF grabs the default. How do I set the default SocketFactory in Java to my own implementation (such as a property)?
What I am not looking to do is to set the default SocketFactory properties like setting t...
I have an implementation which uses ioctl(FIONREAD) to determine the number of pending octets in the Raw Socket receive buffer in Linux and then call a recv on that.
I read somewhere that the ioctl interface for raw sockets in Linux does not actually return the actual pending octets. Is this correct?
I am asking because I am loosing s...
How can I detect that a socket is half-open? The case I'm dealing with is when the other side of a socket has sent a FIN and the Ruby app has ACKed that FIN. Is there a way for me to tell that the socket is in this condition?
Take, for example:
require 'socket'
s = TCPServer.new('0.0.0.0', 5010)
loop do
c = s.accept
until c.cl...
I am new to php and I am getting this error trying to load a cert
jameys-macbookpro41:~ user$ php -f ~/Sites/providerService.php
Warning: stream_socket_client(): Unable to set local cert chain file `cert.pem'; Check that your cafile/capath settings include details of your certificate and its issuer in /Users/jamey/Sites/providerServic...
Is it possible to connect a socket between two mobile devices (iPhones) over the internet?
I am trying to discover the IP of each device and connect directly. I know it can be done with Bonjour but that only works on local networks. I need a high speed connection between two devices over the internet.
Thanks.
...
For those who deal with microcontroller programming...
I want to take a momentary contact switch (let's say a Staples Easy Button, since that's the most fun momentary contact switch around), and when it is pressed, send a broadcast UDP packet across a network (to be received by a .NET application and do all sorts of fun things from ther...
I'm trying to write a simple SNPP (Simple Network Paging Protocol) client using sockets. Everything seems to be working well, except for a small inconsistency between servers.
When I send a command, I need to read the reply, which is usually a single chunk of data. However, Sprint's SNPP server sends replies in two parts. The first chun...
What is the easiest way to check if a socket was closed on the remote side of the connection? socket::is_open() returns true even if it is closed on the remote side (I'm using boost::asio::ip::tcp::socket).
I could try to read from the stream and see if it succeeds, but I'd have to change the logic of my program to make it work this way...
Hello,
VS 2008
I am using the code below to detect if the client can connect to our sip server. This was working fine. However, the client has changed there network and now my application has to connect to the sip server from behind a proxy server.
The error I get is the "A connection attempt failed because the connected party did not...
I need to count amount of bytes sent and received from the network by various applications. First I thought about using LSP, but there is a lot of applications that do not use LSP at all (SMB for example). This is why I have written a small sniffer. This application works on IP level and collects data using recvfrom.
So I have address...
I have an iPhone app that is a client for an existing server application.
I am using the following code to connect, and this code was working fine. Today I started work on the project, and something odd is happening.
When I click "Connect" NSHost takes about 30-45 seconds to resolve and connect to the host. Once the connection is estab...
A process on my Linux system, strace tells me, is talking on a socket which has file descriptor 10. lsof tells me that this is a unix socket with inode 11085, and netstat further tells me that inode 11085 a stream socket, and that it's connected.
Given that this process doesn't have any other threads, there must therefore be another pro...