networking

How can I establish a TCP connection between many computers behind two firewalls?

I'd like to establish several TCP connections between computers behind a firewall. The follow picture illustrates a simple network: From the picture I'd like to establish 3 TCP connections: A => 2 B => 2 C => 2 What are my options for establishing these TCP connections? and Can I do this without port forwarding? ...

Options for Client Server Communication in Android

I'm currently in the research phase of my dissertation project. My project is a ticket booking system for a mobile device and I have chosen to target Android. I anticipate the need for a client/server architecture with a central server, and so am currently looking at how Android could communicate with such a server. The server would gr...

How can two C# apps send messages over a WiFi Network?

Lets say I have my C# app installed on 2 laptops connected to a WiFi Wireless Local Area Network. How can these apps send messages to each other? What method or library can I use? I heard of using sockets but I have no idea how to work with these. ...

Java HTTP AUTH?

I'm trying to connect a desktop application I am writing with the del.icio.us api @ http://delicious.com/help/api and simply provide them with my username and password and to request an url to post a bookmark to my profile. The problem I have is that I don't understand how to send my login credentials when I open a connection. How woul...

what ip address does accept return

see the following code: accept(sockfd, (struct sockaddr*)&cliaddr, &slen); cout << inet_ntop(AF_INET, cliaddr.sin_addr, ipv4addr, 100); my client connects from localhost. i get an absurd address in the output. this is not my ip address. everytime i run the code i get a different ip address. when i ping that ip address i don't get any ...

multicast ip address - blocked in call to recvfrom

i am writing a simple multicast application. i intend to run it on localhost. i have done the following: char *maddr; . . . sendfd = socket(...); struct sockaddr_in sasend; sasend.sin_family = AF_INET; sasend.sin_port = htonl(portno); inet_ntop(maddr, &(sasend.sin_addr.s_addr)); struct sockaddr_in sarecv; memcpy(&sarecv, &sasend); ...

Cannot Close Socket After BeginAccept Method

Hello! I have a program in c# in which i create a socket, binding it, begin listening and then using beginaccept! but then when I try to close\shutdown the socket I get exceptions from the beginaccept AsyncCallback method! private void start_listening() { main_socket = new Socket(AddressFamily.InterNetwork, So...

Cocoa - NSNetserviceErrorCode = -72003

Hiyee...Now I'm having this error " NSNetServicesErrorCode = -72003; NSNetServicesErrorDomain = 10; " when I was trying to connect to a domain. My Code for connection: -(IBAction)connect:(id)sender { NSNetService *remoteService = servicesController.selectedObjects.lastObject; remoteService.delegate = self; [remoteService resolveWithT...

Calculate upload transfer speed problem

Hey guys, I have implemented a file transfer rate calculator to display kB/sec for an upload process occuring in my app, however with the following code it seems I am getting 'bursts' in my KB/s readings just after the file commences to upload. This is the portion of my stream code, this streams a file in 1024 chunks to a server using ...

Minimum cost broadcast routing

Is there any method where we can get a minimum cost broadcast routing scheme without using the spanning tree algorithm? Any references to guide me on this will be of great use to me. ...

Setting network options in a RCP Application

We have a RCP application that does sometimes get some data from URLs in the internet. Our customer uses a Proxy-Server, and we can't get to the information we need unless the network-settings are correct (Setting IP of Proxy and the Port-Number). In Eclipse (the IDE), there is the Preferences->General->Network Connections Dialog to set...

Object Oriented module/definition for networking devices/topology ?

Is there any module/definition available for a class/schema for representing the topology, connection, access details etc of networking devices ? The intent is to use this for automation, and to manage routers/servers as objects rather than as tcl keyed lists/arrays which gets unwieldy. ...

Same code with different error...

The same code is running on different computers. One program works well but the other has an error. I'm doing a sending and receiving program using NSNetservice. my GUI contains a textbox(text messaging), textview(for available domain), 3 button(search,connect, send). After I have search, I click on the connect button with this code: -...

multicasting on linux

i am testing a simple multicast application on linux. i got it working on my pc by doing the following: disabling the firewall running the command route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0 if you are interested in the details, see this post why are these two steps required? is there an alternative. i am testing the code o...

convert decimal to hex python

Hi All, Im building a server in python, i need to convert a decimal value to hex like this : let's say the packet start by 4 bytes which define the packet lenght : 00 00 00 00 if the len(packet) = 255 we would send : 00 00 00 ff Now my problem is that sometimes the packet is bigger than 256 as for example 336, then it would be : 00 00...

receving socket python

Hi Alls, Im using the SocketServer module for a tcp server. I'm experiencing some issue here with the recv() function, because the incoming packets always have a different size, so if i specify recv(1024) (i tried with bigger value, and smaller), it get stock after 2 or 3 requests because the packet length will be smaller (i think), and...

C# Asynchronous sending

Hello, I've been working with asynchronous sending in C# lately, and just a couple of days ago when i encountered that i needed to send multiple bits of data, i started wondering if the data sent are sent in order. So my question is, when you send data asynchronously in c-sharp, does it send the data accordingly as it's sent? Eg. I se...

Boost.Asio documentation is non-existent. What do these errors mean?

I'm struggling with two errors with Boost.Asio. The first occurs when I try to receive data on a socket: char reply[1024]; boost::system::error_code error; size_t reply_length = s.receive(boost::asio::buffer(reply, 1024), 0, error); if (error) cout << error.message() << endl; //outputs "End of file" The second occurs when I try to cr...

Go network programming libs

Hi, I've decided to rewrite most of my distributed server programs in Go to replace the existing c# based ones. Can someone point me to a Go TCP libs or a Go general network programming lib. Thanks Edi: ... and how do i complile this code is visual stuido 2008? Thanks ...

SLES 9 vs. SLES 10

Are there any important change in how SLES 10 implements Tcp sockets vs. SLES 9? I have several apps written in C# (.NET 3.5) that run on Windows XP and Windows Server 2003. They've been running fine for over a year, getting market data from a SLES 9 machine using a socket connection. The machine was upgraded today to SLES 10 and ...