networking

Connecting to an NTP server keeps failing (Java)

I'm just learning how to do networking in Java and the first simple example of getting the time from an NTP server keeps throwing a ConnectException. I'll copy and paste the code, but I have the feeling it must be something not code related since this code came out of a book. import java.io.*; import java.net.*; public class AskTime { ...

Hunt down java.net.SocketException: No buffer space available

Hi I have very ugly problem with: java.net.SocketException: No buffer space available (maximum connections reached?) It is client-server app. Client is Windows XP SP2 32b, with two net cards core duo. Java 1.6. u7. Application have couple server socket open for local communication and couple of client socket for rmi to jboss server. ...

'Who's online?' Ruby Network Program

I have several embedded linux systems that I want to write a 'Who's Online?' network service in Ruby. Below is related part of my code: mySocket = UDPSocket.new mySocket.bind("<broadcast>", 50050) loop do begin text, sender = mySocket.recvfrom(1024) puts text if text =~ /KNOCK KNOCK/ then begin sock = UD...

Keeping passwords safe

Situation 1 - Connecting the server to the database: Its always said that passwords should not be stored in plain text, however to connect to the mysql database requires the password, in plain text it seems... I'm guessing the best solution to this is to store it in an encrypted form, decrypt it in my app as needed and then erase it from...

VMWare - network applications

I am developing a distributed file system using Java, I cannot give many details at this moment. I need to test some things on Linux, I will use WMWare server an install Linux inside a virtual machine. Is there any difference between the simulated network card and a real ethernet interface? ...

What techniques can you use to encode data on a lossy one-way channel?

Imagine you have a channel of communication that is inherently lossy and one-way. That is, there is some inherent noise that is impossible to remove that causes, say, random bits to be toggled. Also imagine that it is one way - you cannot request retransmission. But you need to send data over it regardless. What techniques can you use t...

Setting TCP Retransmission Timeout in C

I have an small server/client test program I am running over a radio link using TCP/IP and I noticed with wireshark that I am getting a lot of retransmits due to high latency. How do I increase the window my program waits for an ACK before attempting retransmission? Update on OS: The server is running Linux, the Client is on Windows ...

Sockets & File Descriptor Reuse (or lack thereof)

Hi, I am getting the error "Too many open files" after the call to socket in the server code below. This code is called repeatedly, and it only occurs just after server_SD gets the value 1022. so i am assuming that i am hitting the limit of 1024 as proscribed by "ulimit -n". What i don't understand is that i am closing the Socket, whic...

Need of PRBS Pattern Generating C/C++ API

Hi, I am looking for PRBS Pattern Generating C/C++ API, So that i can insert it in Payload of UDP. If anybody know the procedure for generating PRBS pattern it would be greatfull. ...

Where can I get started with basic online functionality for a game in VB.NET?

I am creating a Boggle clone game and it works very well so far. Right now it is only single player. I would like to make it so that other players can connect, and show up in a listbox, and then I can select that person and play a 3 min round with them. What would be the best way to accomplish this? I know a lot about VB.NET, but I ...

IPv6 zone resolution

Firstly, I'm new to the specifics of IPv6 so I wouldn't be surprised if this is just a mis-understanding of IPv6 routing. Consider the situation where I am running a P2P overlay network , part of which lives within the boundaries of a single LAN. The nodes within this LAN have the following link local addresses (as viewed by themselves):...

WM and C#: How to set up a WiFi Ad-Hoc connection programmaticaly ?

I am trying to build a Walkie Talkie application for a Windows Mobile 6 phone in C# using the .NET Compact Framework. I can't figure out how to set up an Ad-Hoc WiFi Connection programmaticaly. Does anyone know how to do that and what APIs to use? ...

Query ARP cache to get MAC ID

Hi All I need to get the MAC ID of a host in my network. For that, if I ping to that IP and query the ARP cache arp -a, I am able to get the MAC ID. I just wonder if I can get any API to query the ARP and get the MAC id. Also, if there is a better method to get the MAC ID from IP address, please suggest. P.S: I am working in JAVA. Th...

Qt HTTP authentication with QNetworkAccessManager

I'm working with a webservice which requires a valid username/password. From PyQt, I'm accessing the webservice using QNetworkAccessManager which emits the authenticationRequired (QNetworkReply*, QAuthenticator*) signal when (obviously),authentication is required. When I fill in the user and psswd for QAuthenticator, everything wor...

Octet String: What is it?

I am starting to look into some network programming concepts for a project I am about to take over, and I keep running into this concept of an octet string. Can anyone out there provide some feedback into what this is, and how it relates to network programming? ...

Accessing LDAP through SSH tunnel

Hello, I got access via SSH (root access) to a Machine that's inside a network at my client's office. I'm programming in my computer a PHP application that needs to integrate to LDAP. The LDAP server is in another server at my client's network and not accesible from outside, however I can perfectly access it via the server I can conne...

ip address in java

Hey, I've been asked to activate a certain piece of code if i was in my college. So I need to find the iP of where i am to match to my colleges iP. Was wonderng how to do this in java? I have already tried a loop back interface. ...

Limit 1 vote per IP Address?

What I really want is to limit 1 vote per person but the next best thing i can think of is limit 1 vote per IP address to prevent malicious users/hackers from severely tempering with my company's voting system. I was thinking of using a database to keep track of the IP addresses. Update: Sorry about not being clear in the first time aru...

Since IPv6 Is Going To Replace IPv4,Should I Develop My New Application To Support It?

I develop applications using many languages, and a few platforms. From what I am reading IPv6 is going to be mainstream within then next 5-10 years, and that some ISP's even offer direct connection to the IPv6 internet. On my private network - all the machines have dual stacks and communicate with each other using ipv6 when possible. My...

iPhone Networking

If I have make an application, how would I make it interact with a database on a server of mine? I'm kind of lost, and don't know where to start. ...