networking

Asynchronous IO with CFWriteStream

Hi everyone, I'm using CFWriteStreamScheduleWithRunLoop and CFWriteStreamWrite to do asynchronous IO. Here's the question: it seems that only one CFWriteStreamWrite call is safe (free of blocking) per each kCFStreamEventCanAcceptBytes notification, because from the second call, we can't guarantee that the socket is ready to accept more ...

Asynchronous IO with CFReadStream

Hi, This is a sibling question of Asynchronous IO with CFWriteStream. I'm using CFReadStreamScheduleWithRunLoop and CFReadSteamRead to do asynchronous IO. How can we safely retrieve all the date with blocking? Let's say the actual size of a message was 1200 (but we don't know), and the size of my read buffer was 1024. A call to CFReadS...

FTPWebRequest behind NAT (PASV,SSL)

Has anyone successfully used the .Net FTPWebRequest class to ftps to a remote server from behind a NAT? My code is as follows: Dim URI = "ftp://" & sRemoteDir & "/" Dim ftp As FtpWebRequest = Nothing Try ServicePointManager.ServerCertificateValidationCallback = AddressOf ValidateServerCertificate ftp = CType(FtpWebRequest....

how to get list of IP connected in LAN using Java

How to get list of IP connected in LAN using Java. ...

ksoftirqd consumes >80% CPU on embedded platform

Hi we're designing SOHO router based on MIPS processor, wired up with 24-ports switch. The CPU runs NAT (configured with iptables), iptables rules, dhcp etc. it doesn't have any H/W acceleration for these functions. When testing NAT in full-mesh mode (i.e. one WAN port and others are LAN port), we observe the significant system's slowdo...

Android How to find Dynamic IP from device?

I have method to find the DHCP address and host address. how to find the dynamic ip address assigned to my device. I am able get the address from http://www.ip2location.com/default.aspx how to get this IP in device? ...

Windows tool to write socket output to file

Does anyone know of a Windows tool that will write the output from a network socket to a file? Open Source (preferably C#) would be preferred, but not essential. I know it would probably be pretty simple to write one, but I am guessing that an existing tool would probably have features that I haven't even realised I want yet. ...

Error 10061 while trying to connect to my own computer

I'm just testing out some basic networking code written in Visual C++. I have a client app and a server app that don't do anything fancy, since I'm just testing - basically, the client sends ASCII-encoded strings to the server and the server sends it back all in caps. Everything works fine when I run both programs on my computer, IF I s...

CRC and checksum

what the difference? ...

using libnet to send ARP request, but arp cache won't update after getting the ARP reply

Hi, I need to look up MAC address in the local network and I'm using Linux. What I do is send a ARP request with libnet, but after I send 3 requests, the cache still won't update. I use wireshark to catch the packets. From wireshark, I did get 3 ARP replays, after each of my ARP request. Does anyone know how come the ARP cache won't ...

select() blocking forever even if timeval is 0 on non-blocking TCP sockets ?

After we do a send(), the error that comes back is EWOULDBLOCK, so then we do a select() with a timeval structure with tv_sec = tv_usec = 0 which should return back immediately, but it doesn't, we are stuck in the select() call, and people have said that have waited over 2 mins, with it still being blocked in the select() call. This is...

Loopback connections working in user's context but not working from Local System account

We have a networking application that can run from a service account as well as a regular user's account. The app tries to open up a loopback connection to another service running on the local machine. So for example it tries to connect to: 127.0.0.1 port 2000. On a very small number of Windows machines we're seeing an issue where tryin...

How to send CVImageBufferRef over the network in iOS?

Hi, I want to send a CVImageBufferRef I got from - (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection{ CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer); } over the network using NSOutputStream's write:maxL...

How to access loopback adapter from another PC on my LAN

I have installed MS Loop-back adapter and have given it a static IP: 10.10.10.9 my laptop is configured as 10.10.10.30 , and my gateway is 10.10.10.1 i can ping the loop-back NIC from my laptop, but not from any other machine on the LAN. i am trying to beat the 65k port limitation by seeing if i can have virtual IP addresses on one mac...

In UNIX, how do I send a message to another UNIX box on the same network by IP address?

Just like a "net send" on Windows, if I remember what net send does correctly. I just want to say something like: <command> <IP address> "Hey what's up?" and the message "Hey what's up?" should show up on the other guy's machine. Ideally this shouldn't require installation of any packages not already present in typical UNIX/Linux dist...

what will be the port number in the ip+port combination?

Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls reports 227 Entering Passive Mode (153,18,17,11,238,169) 150 Here comes the directory listing. Entering Passive Mode (153,18,17,11,238,169) the port number here decoded comes out to be 61097. its huge!! is it correct? ...

FTP file transfer, can the client close the data connection? if so how?

After the control connection to port 21 is created, the FTP server sends the 220 (service ready) response on the control connection. The client sends the USER command. The server responds with 331 (user name is OK, a password is required). The client sends the PASS command. The server responds with 230 (user login is OK). The client iss...

Measuring Internal Network Speed/Bandwidth in Java

I need to be able to monitor the speed of my internal network using java. I was thinking I could use a two part system with a server and a client. I do not need need response time such as what is generated with ping but and actual speed in mbps for upload and download. My idea would be to have the Server send a packet or series of pack...

trackTCP Streams among a pcap file

Hello I have a pcap file. By using Jnetpcap library I am reading frames fields such as its length. The problem is I want to find each TCP conversation and then classify them based on their characteristics. For example the bigger one has a video content. I just wonder if anyone have an experience working with TCP flows (Streams). Your he...

How to make a chat system on iPhone?

I'm doing research for making a chat based app for the iPhone (it's not really text chat in the regular sense, but the principles are the same). Maximum 6 people can be logged into the same chat room at any one time, and the most basic question is how to efficiently check for new messages? Would I need to simply poll the server perio...