sockets

How to use socket to pass intents from one device to another?

I am a newbie here and would like to know how am i going to send an intent from one device to another. Not using the C2DM feature but can access to a server to get data. Is there any sample application like this? passing intent from one device to another. thank you. ...

iPhone / iPad Write Lage File over Socket SigPipe error .....

Im using Erica Sadun's CookBook code to open a socket on the iPad and use a browser on my desktop to connect to the socket, provide a list of file (in this case audio files) and allow the user to downloand them to their desktop. Erica's code works fine for small audio files, anything over a few MB's gives me a SigPipe Error and crashes ...

PHP fread problem

hi guys, ive ran into an issue while creating a PHP telnet script at work to gather network data. as the amount of data returned from the 'Action: Status' command could be of any size... im concerned about using a static number with fread() on line 13. I have also tried using fgets() instead but it only grabs the first line of data (t...

C# - The best way to test TCP client (Using Sockets Helper Class)

Any suggestions on testing a TCP client listener. What I'm looking for is actual network stats like "payload size", "time-out values", "actual payload bytes received from server". public static void tcpConnect() { int port = 12345; IPEndPoint ipep = new IPEndPoint( IPAddress.Parse("xx.xx.xx....

What determines maximum local datagram size? (PF_UNIX / SOCK_DGRAM)

Can local message-based sockets transfer messages up to the SO_SNDBUF/SO_RCVBUF limits, or where can the so-called 'fixed maximum length' be determined for a descriptor created with socket(PF_UNIX, SOCK_SEQPACKET, 0) or socket(PF_UNIX, SOCK_DGRAM, 0)? ...

What kind of delays are to be expected when opening bluetooth sockets?

I'm trying to optimize some code that I have that requires me to try and contact a few bluetooth devices using RFCOMM. Right now it's taking at least 2 seconds to successfully open a socket to any of the devices. Is this kind of delay normal? ...

10038 socket error

Is there any solution for 10038 server error .i have done coding in c++; the server runs fine 10 to 12 hours but sudenly it gives 10038 socket error ...

Developing an Online Webcam Video Surveillance System in .NET (Real Time Video Streaming Issues)

This semester I'm working on an application that is joining two projects in two different courses in my Software Engineering degree: SWE 490: Component Based Software Engineering SWE 344: IP and Client Server programing Here's what's my application about : Client Side (Desktop Based): Main function is to capture the webcam video and s...

sendto not working on VxWorks

I asked this question before and had no resolution (still having the problem). I am stumped because the function returned without error and NO DATA was sent! This code works on Linux ... the VxWorks version does not work (sendto does not send, though it returns without an ERROR). The synopsis - I am writing a simple echo server - The se...

Why can't I use the WaitHandle from Socket.BeginSend to wait for the operation to complete?

Hello all. I was using the following code to send data asynchronously but I noticed that using WaitOne in the AsyncWaitHandle that I get from asyncRes doesn't wait at all. I checked MSDN and it says I should use a ManualResetEvent. ... var asyncRes = _socket.BeginSend(encodedFrame, 0, encodedFrame.Length, SocketFlags.None, sendCallback,...

HTML 5 web sockets and XMPP Server dialog

Does using web sockets actually mean browsers will be able communicate with xmpp servers (any other IM servers) directly ? Thx. ...

C++ iptables redirection forming separate packets

I have all traffic from port 50 redirected to 5050 using iptables -t nat -A POSTROUTING -p udp --dport 50 -j REDIRECT --to-port 5050 I listen using a RAW Socket on 5050, and I see IP packets from 0.0.0.0:50 to 0.0.0.0:5050. The original destination address is obviously not present, since this seems to be a separate redirection packet...

How to handle OpenSSL SSL_ERROR_WANT_READ / WANT_WRITE on non-blocking sockets

The OpenSSL library allows to read from an underlying socket with SSL_read and write to it with SSL_write. These functions maybe return with SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE depending on their ssl protocol needs (for example when renegotiating a connection). I don't really understand what the API wants me to do with these res...

Java : Socket programming example

What is wrong with the following program to fetch time from time server. public class SocketTest { public static void main(String[] args) { Socket s = new Socket(“time-A.timefreq.bldrdoc.gov”, 13); BufferedReader in = new BufferedReader( new InputStreamReader(s.getInputStream())); S...

File Descriptor Sharing between Parent and forked Children

I am a beginner in network programming.. i follow stevens and implementing UDP server with reliability. i have a question. when a child is forked what happens to parent socket fd in child ...? i read that they get inherited that means we have two copies of socket fd in parent and child ?? do we need to close the inherited parent socke...

C# - Multiple TCP connections on one port?

What I'm wondering is, am I allowed to do this client_db.clients[numberOfClients].sock = listener.Accept(); For my networking class I'm writing a chat client and a server that it connects to. I have an array of client objects that contains various info about each of the people connecting to the server. Before when dealing with one cli...

How to tell if a file handle is a socket?

I need to log socket usage, and I wrote a LD_PRELOAD library. The problem is when I override read() and write() than ordinary file operations are get logged too (of course). So how can I tell ordinary file descriptors and socket descriptors apart? ...

Print to server screen in socket

Is there any reason why the server process does not give any output in the following code? require 'socket' server = TCPServer.open(3000) loop{ puts "waiting for connection" client = server.accept puts "connection!" client.close puts "client closed" } I connect via: nc localhost 3000 in a windows cygwin environ...

How to write a port scanner listening for 'ACK' in python?

please can anyone help me with the port scanner program to scan ports on the IP address provided,for ACK. i want to know the technique used to scan for ACK & use multi-threading so please help me in that perspective. Thank you ...

Stack overflow when using the System.Net.Sockets.Socket.AcceptAsync model

With respect to C# and .NET's System.Net.Sockets.Socket.AcceptAsync method, one would be required to handle a return value of "false" in order to handle the immediately available SocketAsyncEventArgs state from the synchronously processed connection. Microsoft provides examples (found on the System.Net.Sockets.SocketAsyncEventArgs class ...