networking

HTTP As Communication Layer for a Game

I've just started dabbling in some game development and wanted to create a simple multiplayer game. Is it feasible to use HTTP as the primary communication protocol for a multiplayer Game. My game will not be making several requests a second but rather a a request every few seconds. The client will be a mobile device. The reason I'm ask...

How to determine MAC Address of the actual physical network card -- not virtual network interfaces created by VPN's (.NET C#)

Background I'm trying to get obtain a unique identifier out of a computer and want to be able to reliably return the same MAC address each time. Trust me I have my reasons for using MAC address and have read many posts about alternate unique id methods (and yes i've considered if they don't have any network cards). Problem The prob...

Fork before or after accepting connections?

The following snippet of code creates 4 processes, all sharing the same listening socket. Is there any danger in doing this? Should I always have one listening process and fork after connections are accepted, in the conventional manner? for (p = 0; p < 3; p++) { pid = fork(); if (pid == 0) break; } while (1) { unsigned int cl...

determine which mac/ip address(es) are connected to a switch port

hi, i have some linksys srw 2024 switches. id like to know which device(s) is connected to which switch(port). how could this be done...? ...

How to avoid a NoRouteToHostException?

Disclosure: the code I'm working on is for university coursework. Background: The task I'm trying to complete is to report on the effect of different threading techniques. To do this I have written several classes which respond to a request from a client using Java Sockets. The idea is to flood the server with requests and report on how...

How to determine the binding order of network interfaces on Windows using .NET?

I'm trying to find the magical answer to the "what's the primary IP address" of a system. My research has determined that the answer to "best" means this: Look at [system.Net.NetworkInformation.NetworkInterface]::GetAllNetworkInterfaces() for interfaces with default gateways assigned. If you only find one, then you are done. If there's...

Books to read on networking and microcontrollers?

Hi folks, I was recently elected programming team lead for my community college's engineering club. We're going to put a solar panel on a roof. The programming part involves Controlling servos to adjust the orientation of the panel Sending data on the electricity collected by the panel to a server (we haven't decided whether we want...

java chat application

I want to devlop java chat application. I am looking for any java framework that will help me in devloping chat application. So that i can easliy devlop the chat application using the framework. The application needs to run only in LAN. I want the chat application like yahoo chat (with only one main room). Please suggent me any open s...

How to track "freezing" app, finding its source?

Hi, I have a server with 3 threads and a threadpool for recieved data processing. The only locks (reader and writer) Im using are for client connection lists. Sometimes the main form freezes for a second and I cannot find the problem. The form doesnt do any hard work, thats for different threads. I wanted to ask whather there is not any ...

How to toggle the option returned by ConnectivityManager.getBackgroundDataSetting() ?

Did anybody watch jsharkey's battery life google io presentation ? How does one toggle the option returned by ConnectivityManager#getBackgroundDataSetting() in the emulator ? ...

Communication over a Bluetooth PAN Ad-hoc network on Windows Mobile

I have two devices that are connected via a Bluetooth Ad-hoc Personal Area Network. What can I do to actually have my app communicate over this network? I am kind of at a loss for the next step. The end goal is to take a in memory class and transfer from one device to the other. I would love an example in C#. (I am using Compact Fra...

Bind: Address Already in Use

I'm trying to run my server program but I keep getting this error: ERROR on binding: Address already in use int main(int argc, char *argv[]){ if (argc < 6){ printf("usage: stringSearcher <filename> <stringLength> <searchLength> <nChildren> <nThreads> <blockSize>\n"); exit(0); } char* fil...

Firewall / visited websites logger

Hi. I have a firewall implementation and I want to log all the websites visited on the machine. So when the user enters an address in the browser(any browser) or clicks a link to be able to log the visited address. The problem is that I want to log only the visited address and NOT the other resources requested by the page (ads, iframe...

C# Network encoding

I'm working on a networking application in C#, sending a lot of plain numbers across the network. I discovered the IPAddress.HostToNetworkOrder and IPAddress.NetworkToHostOrder methods, which are very useful, but they left me with a few questions: I know I need to encode and decode integers, what about unsigned ones? I think yes, so at...

Sending large chunks of data over Boost TCP?

Hello, I have to send mesh data via TCP from one computer to another... These meshes can be rather large. I'm having a tough time thinking about what the best way to send them over TCP will be as I don't know much about network programming. Here is my basic class structure that I need to fit into buffers to be sent via TCP: class Pr...

how to send data over network fast?

i have lots of data like this 1:0x00a4c7d9fb3849... 2:0x79821309bd789c7689c97... 3:0x0178dce67fe898... they are more than 100 per second and speed is the most important thing(network is always busy). what should i use to transfer my data(tcp/ip, pipes, via, etc)? how should i serialize it(BinaryFormatter,Xml,User defined or any better ...

How to Send Packets Between Two IP Hosts on Different Subnets?

Host 1: 10.10.0.1 Host 2: 10.10.1.2 Mask is both: 255.255.255.0 How to send a packet from Host 1 to Host 2? ...

Truly understanding Networking?

I understand the basics of networking such as Lan and stuff. I know what many of the protocols are and how to build a client/server socket program in C. But what I really want is a very good understanding of how networks actually work. Not only from a programming aspect but also from a application aspect. I am looking for some materi...

Determine source of network traffic on Ubuntu

I run an installation of Ubuntu as a server. I have noticed that it is constantly transmitting data over the Internet, which is a little unexpected. Is there a tool I can use to determine the origin of the data (i.e. which program is sending the information)? I have full root and physical access to the machine. Thanks ...

how do i get the Port from an in_addr value?

hi, I am trying to extract the port from a given in_addr value in windows. So far I am able to get the IP address using inet_ntoa but not the port. Thanks. ...