networking

Send a file to a socket

Hello. I'm trying to send a file to a particular socket using C; here's the code: int send_file(char *filepath,int sock) { FILE *fp=fopen(filepath,"rb"); void *buff=malloc(2000); int i=1; while(i) { int bytes_read=fread(buff,1,2000,fp); i=!(feof(fp)); int bytes_sent=0; while(bytes_sent...

How to set up a development environment at home?

I would like to know how can I set up a development environment at home. I'd like to make a kind of simulation to imitate a real software development firm. I am learning Ruby and Java, and I have the necessary tools for small projects on my laptop (compiler, interpreter, IDE etc). However I'd like to experiment with some other stuffs suc...

How SQL Server processes simultaneous requests?

If multiple queries to one and the same large table come to SQL Server at the same time, how SQL Server resolves conflicts in this case? When using LINQ to SQL queries in WPF application for install on many PC's, working in network with SQL Server database, should I somehow implement mechanism for resolving such issues or am I protected...

Rewriting a tcp stream on the fly: how difficult is it? How about taking a dump of said stream?

I'm trying to write a tcp stream 'tunnel' (similar to the ones SSH handles by default) but with one exception, I have to rewrite certain information as it flows through. I'm certain there's something similar out there but I have not been able to find it. I have three main questions: Is there an easy way to save a tcp stream for obser...

BlackBerry - Connection problem using WAP2

I am trying to establish connection to following url : " http://local.yahooapis.com/LocalSearchService/V3/localSearch?appid=0KOmkJ7V34Hvfo6oPV4YJaKmTz69b_UMMhOyBex5v24Gnyr3t4lrN26HBjwbfT.khg--&query=pepsi&latitude=37.79581&longitude=-122.38008&results=5" The problem is that when i am trying to make an connection to abo...

Is networking hardware knowledge related to software programming?

I am a programmer. More specifically, I do php and website stuff. At school, there is this class that I can take called CISCO Networking Academy. Cisco Networking Academy is a global education program that teaches students how to design, build, troubleshoot, and secure computer networks for increased access to career and economic op...

Retrive List of hardware and software installed on remote machine in LAN. Which DLL to Use ?

I am trying to retrieve a list of all hardware like Device Manager and Softwares installed like in "Add and Remove Programs" on a remote system in LAN. Is it their any 1 or 2 dlls to include instead of all dll for each hardware. ? ...

How to determine which network adapter is connected to the internet

I'm writing a program in C# that needs to monitor the amount of internet bandwidth currently in use so it can do a background upload when the internet usage is low. How can I automatically determine which network adapter is the one connected to the internet? ...

TCP Sequence numbers related problem

While opening a TCP connection , the initial sequence number is to be derived using ToD clock that keeps running even when the host is down. The low order 32 bits of the counter of the ToD clock is to be used for the initial seq no. The clock counters increments once per milli second. The maximium packet lifetime is given to be 64s. Wh...

Problem with Java selector/SocketChannel

I'm having a problem with a multiplayer game. Right now, I'm just trying to get the server to send the current level to the client. The server is definitely sending the data, but it never gets to the client application. Client code: public void run() { while(true) { try { sel.select(); Set r...

Ruby TCPSocket recv blocking and never returning.

So, I have the following code: def LSCPHandler.send_message(message, hostname, port) s = TCPSocket.open(hostname, port) s.print message ret = s.recv(1024) s.close LSCPHandler.parse_error(ret) return ret end Which works just fine, normally. The server I'm talking to returns the response pretty quickly, usually, and all is well. ...

How is.NET's NetworkStream delimiting multiple messages in the same packet?

So I've been tasked with creating a tool for our QA department that can read packets off the wire and reassemble the messages correctly (they don't trust our logs... long story). The application whose communication I'm attempting to listen in on is using .NET's TcpListener and TcpClient classes to communicate. Intercepting the packets ...

C: Question about Beej's networking guide... Is there an assumption here?

I was just going through the Networking Guide by Beej and am curious about this part of the code (specifically marked with "From here" and "To here"): // main loop for(;;) { read_fds = master; // copy it if (select(fdmax+1, &read_fds, NULL, NULL, NULL) == -1) { perror("select"); exit(4); ...

Unable to open socket connection with J2ME application on HTC P3400i

I am unable to open socket connection with J2ME application on HTC P3400i. I am able to use the same application Nokia phones. It is working good on Nokia phones. Can anybody help me? ...

Viewing my IIS hosted site on other machines on my network

Hello, at home i have a simple network setup conatining 2 machines. On one machine i have a site hosted with IIS7. Rather than the standard localhost/index.htm address i have added an entry in the HOSTS file pointing the local ip (127.0.0.1) to this domain - www.mysite.dev. i can access the site with www.mysite.dev with no problem. w...

prove network is truly unavailable

I have an old school foxpro web app that I am trying to help limp along while I rewrite the system. Every day, multiple times, I get this following error message: The specified network name is no longer available. Does anyone have any suggestions how to troubleshoot this? Perhaps, prove to my IT guys that there really is a network iss...

tcpdump to read multiple port!

Hey ,I was trying to findout a way to read multiple port using tcpdump.suppose i have two port p1 and p2 , i want to read the traffic moving through both port simountinously.is there any way to do it using tcpdump or will i have to use some other tool. Basically i am running proxyserver which is running on some port.i want to read the t...

How to send DSCP-marked packets using iperf?

How to send DSCP-marked packets using iperf? I did not find the option in 1.7.0 version on Windows. Are there any newer versions of iperf for Windows? ...

How to simulate a large network of machines for testing?

Currently, I am writing an application that utilizes WMI to scan all the computers on our Active Directory network. I'm interested in testing the program against all flavors of Windows machines in a testing environment. Is there a way to similuate this environment in VMware or something? Any ideas? ...

How to measure the TCP/IP overhead without sniffing?

Hello, I'm wondering whether there is a programmatic way to obtain a measure of the full bandwidth used when sending data through a TCP stream. Since I cannot seem to know how the network stack would divide the stream into packets, or when it sends a TCP SYN or ACK or many of the things it does in the background for you, I can only get ...