networking

SslStream.ReadByte() blocks thread?

I'm trying to write an Imap4 client. For that I use a SslStream to Connect to the Server. Everything's fine until I send the "Login" command. When I try to get an Answer to it, SslStream.ReadByte() block the thread. The result is that my programm crashes always. Whats happening here?? Code: if (ssl) { s = stream; } ...

Get netstat Info in Silverlight

Is it possible to get information from the netstat command in Silverlight? How would I go about doing this? ...

Does more NICs on a server mean potential for more sustained concurrent I/O?

If you're trying to build an application that needs to have the highest possible sustained network bandwidth, for multiple and repetitive file transfers (not for streaming media), will having 2 or more NICs be beneficial? ...

Preventing threads from writing to the same file

I'm implementing an FTP-like protocol in Linux kernel 2.4 (homework), and I was under the impression that if a file is open for writing any subsequent attempt to open it by another thread should fail, until I actually tried it and discovered it goes through. How do I prevent this from happening? PS: I'm using open() to open the file....

Preventing write into a socket before the other side accepted the request

I'm implementing an FTP like protocol in Linux (homework) and I came upon the following problem: the client may be able to connect() and write() before the other side managed to do accept() (but after it did listen()). How can I prevent the write operation from working without relying on passing messages like "accept succeeded, you can w...

Get machine name for remote computer on local network

Hi, I've 2 machines with names Comp1, Comp2. There is a DNS name for them, that mask them as one, let say DNSName. I get IP addresses for both machines via Dns.GetHostEntry("DNSName"). But when I try get Dns.GetHostEntry(ipAddress) entry.HostName always contains DNSName. I found some way to get name through WMI. But our policy doesn't al...

differnce between LAN,WAN and MAN

please specify me the differnces in between LAN,WAN and MAN. ...

Gathering mac addresses with Python

Hi, is there a good way to gather the mac addresses of machines on a local network using Python. If it helps I'm trying to execute this python script from the DHCP server for the network. I'm new to Python but would it be a bad idea to look at the DHCP leases file for this info? I'd like to use this inside a Django app eventually. Thank...

Write failed, errno 0

I have a client server situation in which I receive data using read(socket, char_buf, BUF_SIZE) and then try to write it into a log file using write(filefd, char_buf, strlen(char_buf)) Strangely enough this fails (write returns -1), and yet the errno is set to 0, and I can print the message, AND the log file descriptor works (I w...

C# Detect Localhost Port Usage

In advance, thank you for your advice. I am currently working on a program which uses Putty to create a SSH connection with a server that uses local port forwarding to enable a client, running my software, to access the service behind the SSH server via localhost. IE: client:20100 -> Internet -> Remote SSH server exposed via router/fi...

How to integrate radio sevice in asp.net? How can we tune a radio station from a predefined list?

Our team working on a networking project We want to integrate radio services in our networking project We want to tune a radio station from a predefined list How can we achieve this? ...

From a Java programming perspective, what difference does multicast make to a networking program?

My manager has asked me to assess what changes would be required to add multicast support to a socket-based TCP/IP networking program that is part of a trading system. As far as I can tell, from the perspective of a Java program, it doesn't seem to matter too much whether the program is unicast or multicast. Doesn't the Java networki...

What possible uses would multicast support have in a Java trading system?

I've been asked to look into adding multicast support to a Java trading system but, to be honest, I don't have the slightest clue what this could be for. Would this mainly be to allow the trading system to broadcast trade messages to different types of clients, say, a mobile phone as well as a server? Why might a trading system need mult...

Directory on another machine - Login credentials

My application needs to access files on a remote machine that requires a username and password for accessing it. I'm trying to find out if a directory exists (using Directory.Exists) to verify I can make the 'connection. Is there a way to supply the username and password when working with remote directories? Currently Exists returns f...

Problem with MIB_IFTABLE & MIB_IFROW

Hello there, Im using MIB_IFTABLE & MIB_IFROW to get the no.of bytes transmitted & received. Everything looks fine, and values are correct in case of using WIFI alone. But when i use vpn connection over wifi these values are not correct for wifi adapter, interestingly i'm getting correct values for vpn adapter. And if i see status of any...

.NET NetworkStream closed, how to be sure all data is read?

I've an open TCP connection, and reading using NetworkStream.BeginRead(). Once the connection is closed at either end, the callback is called and the stream object is useless - like documentation says, EndRead() throws IOException or ObjectDisposedException depending in this case on which end terminated the connection. Is it guaranteed ...

Should I use RMI for Java multiplayer game?

I'm building a Monopoly game in Java and I want it to be able to support games over the net (the point was so me and my friends over in the US of A could play). Networking is a whole area of programming I have yet to enter so I have been finding it quite hard to decide how exactly to pull it off. In general, I felt that the correct way ...

Which socket, the clientSocket = accept() or the listen(socket), do you setsockopt SO_KEEPALIVE on?

Which socket, the clientSocket = accept() or the listen(socket), do you setsockopt SO_KEEPALIVE on to get the connection to clients not to drop? ...

HTTP POST contents in Haskell

I'm trying to post some data to a server in Haskell and the server side is coming up empty. I'm using the Network.HTTP library for the request. module Main (main) where import Network.URI (URI (..), parseURI, uriScheme, uriPath, uriQuery, uriFragment) import Network.HTTP import Network.TCP as TCP main = do conn <- TCP.openSt...

is it possible to limit the network traffic from my PC to my PC?

Hi Guys I'm debugging some CS program and to view the performance of the application in slow internet I tried many different ways. However the best would be the Server and the client be in the same PC ---- my debugging environments for both the server side and the client is setup in one PC. So I'm wondering is there anyway to limit the ...