network-programming

How to flush DNS cache in Windows Mobile programmatically?

Hello, My windows mobile application (written in C# with the compact framework) needs to know if a particular machine is active or not. To achieve this goal, I thought to use a ping mechanism. I tried to use the Ping class implemented in the opennetcf framework (the System.Net.NetworkInformation.Ping class for the .NET Framework is no...

TCP Socket Communication Limit

Is there any limit on the size of data that can be received by TCP client. With TCP socket communication, server is sending more data but the client is only getting 4K and stopping. ...

Rewriting Live TCP/IP (Layer 4) (i.e. Socket Layer) Streams

I have a simple problem which I'm sure someone here has done before... I want to rewrite Layer 4 TCP/IP streams (Not lower layer individual packets or frames.) Ettercap's etterfilter command lets you perform simple live replacements of Layer 4 TCP/IP streams based on fixed strings or regexes. Example ettercap scripting code: if (ip.p...

http response to GET request - working in FF not Chromium

For fun I'm trying to write a very simple server in C. When I send this response to Firefox it prints out the body "hello, world" but with Chromium it gives me a Error 100 (net::ERR_CONNECTION_CLOSED): Unknown error. This, I believe, is the relevant code: char *response = "HTTP/1.0 200 OK\r\nVary: Accept-Encoding, Accept-Language\r\nC...

Regarding to get refrence of IDot11AdHocManager Interface of COM WiFi AdHoc manager Interface

I am Trying to create AdHoc connection and for this i am using AdHoc wifi Interface provided by Microsoft. I have written code :- IDot11AdHocManager *pIAdHocMng = NULL ; HRESULT hr = CoInitialize(NULL); hr = CoCreateInstance(CLSID_Dot11AdHocManager,NULL,CLSCTX_INPROC_HANDLER ,IID_IDot11AdHocManager ,(void**)pIAdHocMng); if(hr == ...

Active directory logonCount is 0, though the user has logged in

For a user in active directory, the properties hold values for lastlogontime & lastlogontimestamp but the logoncount is 0. I am having only one domain controller in that domain. I found from surfing, that logonCount value of 0 indicates that the value is unknown. But I am totally confused with why it is unknown. Is that an issue with A...

C: socket connection timeout

I have a simple program to check if a port is open, but I want to shorten the timeout length on the socket connection because the default is far too long. I'm not sure how to do this though. Here's the code: #include <sys/socket.h> #include <sys/time.h> #include <sys/types.h> #include <arpa/inet.h> #include <netinet/in.h> #include <errn...

gethostbyname replacement for IPv6 addresses

Hi, I have a program that uses gethostbyname (in Windows) in order to convert IP address to hostname. But, it works only for IPv4... What is the correct replacement for IPv6? Thanks. ...

What is the iPhone simulator IP address?

Hi I have been looking for the answer to this question for some time. I am doing network programming for the iPhone and it is necessary for me to use the IP address of the device. This isn't a problem on the physical device as it has its own IP address on the network. However I was wondering what was the case with it on the simulator. D...

Inform me when site (server) is online again

When I ping one site it returns "Request timed out". I want to make little program that will inform me (sound beep or something like that) when this server is online again. No matter in which language. I think it should be very simple script with a several lines of code. So how to write it? ...

Trying to packetize TCP with non-blocking IO is hard! Am I doing something wrong?

Oh how I wish TCP was packet-based like UDP is! [see comments] But alas, that's not the case, so I'm trying to implement my own packet layer. Here's the chain of events so far (ignoring writing packets) Oh, and my Packets are very simply structured: two unsigned bytes for length, and then byte[length] data. (I can't imagine if they were...

Sockets and COBOL

I have received a job at a hospital which still uses COBOL for all organizational work, the whole (now 20 Terabyte) database (Which was a homebrew in, guess what, COBOL) is filled with the data of every patient since the last 45 (or so) years. So that was my story. Now to my question: Currently, all sockets were (from what I've seen) i...

MD5 purpose or uses

If we can't decode the MD5 hash string, then what is the purpose of MD5 where can we use MD5. ...

python interactive web data/forms/interface communicating with remote server

What's an efficient method (preferably simple as well) for communicating with a remote server and allowing the user to 'interact' with it (IE submit commands, user interface) via the web browser (IE a text box to input commands, and an text area for output, or various command-less abstracted interfaces)? I have the 'standalone' python c...

Capture RTSP stream to fixed sized files

Hi, I want to capture a RTSP stream from a camera into a series of fixed sized file 1MB each. and then send it to a storage server via Http POST. How do i do this. Target languages - any, prefer: JAVA. ...

Solaris: Programmatic interface to ifconfig?

I'm looking for a programmatic interface to the Solaris ifconfig(1M) command. Apparently Linux has the getifaddrs(3) command, but as far as I can tell this has not been ported to Solaris. Short of attempting to use the code at the link above, is there any way to determine ifconfig(1M)-type data (network interface presence, state, etc.)...

iPhone - Browsing iPhone files through computer

I want to be able to send files from an iPhone app to a computer. What would be the easiest way of doing this? I've made simple server client programs before, but in those, the client has always needed to connect to the server before being able to receive messages from it. There is an app for the iPhone called iSimulate, where you put a...

Good C# Networking Book

Hey guys I am looking for a good solid introduction book to the fundementals of network programming in C#. For example is have looked at this one http://www.amazon.com/C-Network-Programming-Richard-Blum/dp/0782141765/ref=pd_sim_b_5 but it is quite old now. Anyone used one recently, i would greatly appriciate it thanks dan ...

Can I ran 2 or more Tcp Sever applications on one computer?

Hi all. I have a client-server Silverlight application, which is use Socets. I have server appliaction on may computer(Win Form application) and client applucation as web site(Silverlight application). I use policy server which open port 943. Everything works fine on this application. But now I need to write another client-server applica...

Beginner: Sending data over sockets

Can anyone find an example of a simple server/client thing? I'm willing to use any C++ library or even Winsocks it self. I've Googled around but want some opinion on a good article for beginners/sites. ...