network-programming

How to send a WOL package(or anything at all) through a nic which has no IP address?

I'm trying to send a WOL package on all interfaces in order to wake up the gateway(which is the DHCP server, so the machine won't have an IP yet). And it seems that I can only bind sockets to IP and port pairs... So the question is: How can a create a socket(or something else) that is bound to a NIC that has no IP? (Any languge is ok. ...

select on UDP socket doesn't end when socket is closed - what am I doing wrong?

I'm working on Linux system (Ubuntu 7.04 server with a 2.6.20 kernel). I've got a program that has a thread (thread1) waiting on a select for a UDP socket to become readable. I'm using the select (with my socket as the single readfd and the single exceptfd) instead of just calling recvfrom because I want a timeout. From another threa...

Socket programming in C.

Ok, so I'm trying to get some UDP code working and I'm barely green when it comes to network programming using C. I'm using the sample file from here Basically I'm just listening for incoming UDP packets on a given port and then I want to send some data back the same way. Below is the relevant part. At this point the socket is set up a...

Login to windows xp programatically

Anyone heard that its possible to login to windows xp programatically, I want to modify the way the Domain Controller authenticates the user and if the user authenticated in my special way it returns the user name and password to the service working on the client machine so it should login the user using its passed credentials from the D...

Get list of computers in a domain using .Net

How to get list of computer names in a domain using C# ? ...

What happens to not accepted connection?

Assume a listening socket on localhost:80 and a client connecting using: telnet localhost 80 The problem is that I want only to accept a limited number of concurrent clients, assume only one. After that I simply don't accept any. The problem that I saw using: netstat -a is that next client connection was established. Yes I don't proce...

Where can I found the stack of protocols that ICQ using to develop my own client?

I am going to develop ICQ client and I just wonder where can I find a reference to understand the protocols they used? Any links, books, etc. And, by the way, if I am not mistaken - all ICQ clients - QIP, Miranda, ICQ Lite and others - uses the same version of protocol to communicate correctly with ICQ servers? ...

Java Socket Programming

I am building a simple client/server application using java sockets and experimenting with the ObjectOutputStream etc. I have been following the tutorial at this url http://java.sun.com/developer/technicalArticles/ALT/sockets starting half way down when it talks about transporting objects over sockets. See my code for the client http:/...

How to simulate network failure for test purposes (in C#)?

I'm building what could be called the DAL for a new app. Unfortunately, network connectivity to the database is a real problem. I'd like to be able to temporarily block network access within the scope of my test so that I can ensure my DAL behaves as expected under those circumstances. UPDATE: There are many manual ways to disable the...

How do I construct the packets for this UDP protocol?

Valve Software's Steam Server Query protocol as documented here allows you to query their game servers for various data. This is a little out of my depth and I'm looking for a little guidance as to what I need to learn. I'm assuming I'll need socket and struct, correct? I'm comfortable with basic UDP tasks like these, so I guess my ma...

How to get domain controller IP Adress

Hi All, I want to How I can get Domain Controller IP address programatically using C#, anyone tried that? Thanks ...

Java NIO: Sending large messages quickly leads to truncated packets and data loss

I've got this nasty problem where sending multiple, large messages in quick succession from a Java (NIO) server (running Linux) to a client will lead to truncated packets. The messages have to be large and sent very rapidly for the problem to occur. Here's basically what my code is doing (not actual code, but more-or-less what's happen...

C# network programming and resource usage

I've been doing a lot of research on how best to write "correct" network code in C#. I've seen a number of examples using the "using" statement of C#, and I think this is a good approach, however i've seen inconsistent use of it with various expressions. For instance, suppose I have some code like this: TcpClient tcpClient = new TcpCl...

Writing a DirectPlay lobby server to establish regular TCP/IP connection

Greetings! Firs of all, I don't care much about DirectPlay per se, and am fully aware it's deprecated. However, I am currently looking into it for a quite simple reason: I love the way it's integrated in XP's built-in Windows Messenger 4.7 (the "old" one). Frankly, I greatly dislike Microsoft's move of removing the DirectPlay lobby clie...

DirectPlay8 only lists DirectPlay8 lobbyable apps

Hi, I know DirectPlay is deprecated and unintuitive, and thanks for wanting to inform me of that :) Now that we're done with that: DirectPlay8 example "Lobby Client" only lists the DP8 lobbyable applications (lobby servers), which is on my machine only "Microsoft Portrait". Is there a way to get it to list DP7 and older lobbyable appl...

Ruby - See if a port is open

I need a quick way to find out if a given port is open with Ruby. I currently am fiddling around with this: require 'socket' def is_port_open?(ip, port) begin TCPSocket.new(ip, port) rescue Errno::ECONNREFUSED return false end return true end It works great if the port is open, but the downside of this is that occasio...

Network Programming: to maintain sockets or not?

I'm currently translating an API from C# to Java which has a network component. The C# version seems to keep the input and output streams and the socket open for the duration of its classes being used. Is this correct? Bearing in mind that the application is sending commands and receiving events based on user input, is it more sensibl...

What is a good method to handle line based network I/O streams?

Note: Let me appologize for the length of this question, i had to put a lot of information into it. I hope that doesn't cause too many people to simply skim it and make assumptions. Please read in its entirety. Thanks. I have a stream of data coming in over a socket. This data is line oriented. I am using the APM (Async Programmi...

Is there an algorithm for fingerprinting the TCP congestion control algorithm used in a captured session?

I would like a program for determining the TCP congestion control algorithm used in a captured TCP session. The referenced Wikipedia article states: TCP New Reno is the most commonly implemented algorithm, SACK support is very common and is an extension to Reno/New Reno. Most others are competing proposals which still need ...

Is it possible to upload data as a background process in j2me?

Even with a poor network connection? Specifically, I've written code which launches a separate thread (from the UI) that attempts to upload a file via HTTP POST. I've found, however, that if the connection is bad, the processor gets stuck on outputstream.close() or httpconnection.getheaderfield() or any read/write which forces data over...