networking

max value for SO_RCVBUF in Windows?

Quick question, wondering if anyone knew what the limit is for SO_RCVBUF under Windows. ...

ISP-to-ISP fast file transfer?

Jeff Atwood talked about doing an ISP-to-ISP file transfer: http://friendfeed.com/e/63fb9e72-6cd5-a8ac-88dc-02ce720033f9/wow-just-did-an-isp-to-isp-file-transfer-650mb-in/ What is this? I tried Googling for it, but couldn't find anything. We have a need to transfer large amounts of data between two data centers, and this sounds inter...

C# begin*() method vs threadpool for a server

For making a scalable multiuser server in C#, which of these two types of servers are more efficient? You can see an example of the async server using the begin* methods (like beginaccept, beginsend) here, and the threadpool implementation here. I know what a threadpool is and how it works so I pretty much understand how that implement...

Objective-C networking - best practices?

Hi, I'm building an Objective-C app that has both a server and a client. The client can send updates to the server, and the server needs to be able to send updates to each connected client. I've been thinking about how best to implement this system, but am asking for your suggestions. Currently, I'm thinking that when new updates are av...

How do you get the host machine's primary IP address?

Calling the following gives you back a list of all the IP addresses. Dns.GetHostAddresses(Dns.GetHostName()) This sometimes, depending on machine configuration, could give you back more than one IP. So the question is, how do you determine which is the primary IP address? Do you enumerate the NICs? ...

C# Raw Sockets Port Forwarding

I am trying to create a simple C# app which does port forwarding, and need to know how to use the IP_HDRINCL socket option to try to fake out the receiving end to think the connection is really to the source. Any examples would be greatly appreciated. ...

Windows tool for sending complete http body ( including headers ) to server

I was wondering if anyone knew of a tool where I could send a fully formed HTTP body ( headers & content ) to a web server. So far the best I've got is putty but was hoping for something where I could look @ and edit the payload then click a button and send it. ( I could probably write something like this in a couple minutes but was ho...

Serialization byte array vs XML file

Hello, I am heavily using byte array to transfer objects, primitive data, over the network and back. I adapt java's approach, by having a type implement ISerializable, which contains two methods, as part of the interface, ReadObjectData and WriteObjectData. Any class using this interface, would write date into the byte array. Something...

How to stop a read operation on a socket?

From one thread I got the following code: int next_stuff(char **code){ ... len=read(file_desc,buffer+end_len,packet_size-end_len); if(len<=0) { if(len==-1 && errno==EAGAIN) return(0); else return(-1); } ... } while (next_stuff(&buff) == 0) { ... } On the other thread I'd like to fini...

What could be wrong: ping works fine but tnsping works intermittently

We have oracle 10g running on windows server 2003. A machine which runs an application using that database has as of a few weeks ago suddenly started having connectivity problems. Today we ran the automatic updates for windows server and the problem has only gotten worse. I realize this isn't enough information for anyone to diagnose ...

Asynchronous TCP Communication in .NET

Quick question here: is there any obvious benefit to use asynchronous communication with the NetworkStream class (generated by TcpClient), i.e. the BeginRead/BeginWrite methods rather than running a separate thread and using synchronous operations on that, i.e. Read/Write? My impression has been (it could easily be quite wrong) that the ...

Do most modern kernels use DMA for network IO with generic Ethernet controllers?

In most modern operating systems like Linux and Windows, is network IO typically accomplished using DMA? This is concerning generic Ethernet controllers; I'm not asking about things that require special drivers (such as many wireless cards, at least in Linux). I imagine the answer is "yes," but I'm interested in any sources (esp. for t...

DNS and webhops

I'm currently using EveryDNS as dynamic dns. I'm trying to setup the MX records point to Google Apps . Because my ISP blocks port 80, I need to use webhops to redirect. I did exactly what EveryDNS mentions on their site and it works; having my www.mysite.com & mysite.com pointing to www2.mysite.com:8080. The problem relies that when I ...

How do I get the MAC address of a network card using Delphi?

As per title - can anyone help me? ...

How to can I set the Type of Service bits in C#?

I'm writing an application to send data over a network, and need to know if it is possible to set the Type of Service (ToS) bits in the IP Packet header. Anyone know if this is supported by C#, and if so how I should go about implementing it? I know I can use a raw socket type and specify my own header, but I'd rather not have to do thi...

MAC address

public static NDIS_802_3_ADDRESS StrToByteArray(string str) { ASCIIEncoding encoding = new ASCIIEncoding(); byte[] m = encoding.GetBytes(str); NDIS_802_3_ADDRESS mac = new NDIS_802_3_ADDRESS(m); return mac; } You use these method in order to change string to mac address, h...

Need a background process. Thread?

Hello, I need a background process to run every minute or so. I do not want this process to interfere with the responsiveness of the rest of the app. Would this be a good candidate for a thread? If so, how would you suggest I set up the thread - in particular, what classes/methods would be good to look into? ...

One big byte buffer or several small ones?

I'm learning C# asynchronous socket programming, and I've learned that it's a good idea to reuse byte buffers in some sort of pool, and then just check one out as needed when receiving data from a socket. However, I have seen two different methods of doing a byte array pool: one used a simple queue system, and just added/removed them f...

C# Begin/EndReceive - how do I read large data?

When reading data in chunks of say, 1024, how do I continue to read from a socket that receives a message bigger than 1024 bytes until there is no data left? Should I just use BeginReceive to read a packet's length prefix only, and then once that is retrieved, use Receive() (in the async thread) to read the rest of the packet? Or is ther...

Can you explain why DirectoryInfo.GetFiles produces this IOException?

I have a WinForms client-server app running on a Novell network that produces the following error when connecting to the lone Windows 2003 Server on the network: TYPE: System.IO.IOException MSG: Logon failure: unknown user name or bad password. SOURCE: mscorlib SITE: WinIOError at System.IO.__Error.WinIOError(Int32 errorCode, String...